Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Side by Side Diff: base/path_service.cc

Issue 981803003: base: Add/Fix namespace closing comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/path_service.h" 5 #include "base/path_service.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 15 matching lines...) Expand all
26 bool PathProviderWin(int key, FilePath* result); 26 bool PathProviderWin(int key, FilePath* result);
27 #elif defined(OS_MACOSX) 27 #elif defined(OS_MACOSX)
28 bool PathProviderMac(int key, FilePath* result); 28 bool PathProviderMac(int key, FilePath* result);
29 #elif defined(OS_ANDROID) 29 #elif defined(OS_ANDROID)
30 bool PathProviderAndroid(int key, FilePath* result); 30 bool PathProviderAndroid(int key, FilePath* result);
31 #elif defined(OS_POSIX) 31 #elif defined(OS_POSIX)
32 // PathProviderPosix is the default path provider on POSIX OSes other than 32 // PathProviderPosix is the default path provider on POSIX OSes other than
33 // Mac and Android. 33 // Mac and Android.
34 bool PathProviderPosix(int key, FilePath* result); 34 bool PathProviderPosix(int key, FilePath* result);
35 #endif 35 #endif
36 } 36 } // namespace base
37 37
38 namespace { 38 namespace {
39 39
40 typedef base::hash_map<int, FilePath> PathMap; 40 typedef base::hash_map<int, FilePath> PathMap;
41 41
42 // We keep a linked list of providers. In a debug build we ensure that no two 42 // We keep a linked list of providers. In a debug build we ensure that no two
43 // providers claim overlapping keys. 43 // providers claim overlapping keys.
44 struct Provider { 44 struct Provider {
45 PathService::ProviderFunc func; 45 PathService::ProviderFunc func;
46 struct Provider* next; 46 struct Provider* next;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 332
333 // static 333 // static
334 void PathService::DisableCache() { 334 void PathService::DisableCache() {
335 PathData* path_data = GetPathData(); 335 PathData* path_data = GetPathData();
336 DCHECK(path_data); 336 DCHECK(path_data);
337 337
338 base::AutoLock scoped_lock(path_data->lock); 338 base::AutoLock scoped_lock(path_data->lock);
339 path_data->cache.clear(); 339 path_data->cache.clear();
340 path_data->cache_disabled = true; 340 path_data->cache_disabled = true;
341 } 341 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698