Lines Matching refs:path_data
150 bool LockedGetFromCache(int key, const PathData* path_data, FilePath* result) { in LockedGetFromCache() argument
151 if (path_data->cache_disabled) in LockedGetFromCache()
154 PathMap::const_iterator it = path_data->cache.find(key); in LockedGetFromCache()
155 if (it != path_data->cache.end()) { in LockedGetFromCache()
164 bool LockedGetFromOverrides(int key, PathData* path_data, FilePath* result) { in LockedGetFromOverrides() argument
166 PathMap::const_iterator it = path_data->overrides.find(key); in LockedGetFromOverrides()
167 if (it != path_data->overrides.end()) { in LockedGetFromOverrides()
168 if (!path_data->cache_disabled) in LockedGetFromOverrides()
169 path_data->cache[key] = it->second; in LockedGetFromOverrides()
183 PathData* path_data = GetPathData(); in Get() local
184 DCHECK(path_data); in Get()
194 base::AutoLock scoped_lock(path_data->lock); in Get()
195 if (LockedGetFromCache(key, path_data, result)) in Get()
198 if (LockedGetFromOverrides(key, path_data, result)) in Get()
202 provider = path_data->providers; in Get()
227 base::AutoLock scoped_lock(path_data->lock); in Get()
228 if (!path_data->cache_disabled) in Get()
229 path_data->cache[key] = path; in Get()
246 PathData* path_data = GetPathData(); in OverrideAndCreateIfNeeded() local
247 DCHECK(path_data); in OverrideAndCreateIfNeeded()
271 base::AutoLock scoped_lock(path_data->lock); in OverrideAndCreateIfNeeded()
275 path_data->cache.clear(); in OverrideAndCreateIfNeeded()
277 path_data->overrides[key] = file_path; in OverrideAndCreateIfNeeded()
284 PathData* path_data = GetPathData(); in RemoveOverride() local
285 DCHECK(path_data); in RemoveOverride()
287 base::AutoLock scoped_lock(path_data->lock); in RemoveOverride()
289 if (path_data->overrides.find(key) == path_data->overrides.end()) in RemoveOverride()
294 path_data->cache.clear(); in RemoveOverride()
296 path_data->overrides.erase(key); in RemoveOverride()
304 PathData* path_data = GetPathData(); in RegisterProvider() local
305 DCHECK(path_data); in RegisterProvider()
318 base::AutoLock scoped_lock(path_data->lock); in RegisterProvider()
321 Provider *iter = path_data->providers; in RegisterProvider()
329 p->next = path_data->providers; in RegisterProvider()
330 path_data->providers = p; in RegisterProvider()
335 PathData* path_data = GetPathData(); in DisableCache() local
336 DCHECK(path_data); in DisableCache()
338 base::AutoLock scoped_lock(path_data->lock); in DisableCache()
339 path_data->cache.clear(); in DisableCache()
340 path_data->cache_disabled = true; in DisableCache()