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

Side by Side Diff: components/web_cache/browser/web_cache_manager.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 "components/web_cache/browser/web_cache_manager.h" 5 #include "components/web_cache/browser/web_cache_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 UMA_HISTOGRAM_MEMORY_MB("Cache.MaxCacheSizeMB", 49 UMA_HISTOGRAM_MEMORY_MB("Cache.MaxCacheSizeMB",
50 default_cache_size / 1024 / 1024); 50 default_cache_size / 1024 / 1024);
51 51
52 return default_cache_size; 52 return default_cache_size;
53 } 53 }
54 54
55 } // anonymous namespace 55 } // anonymous namespace
56 56
57 // static 57 // static
58 WebCacheManager* WebCacheManager::GetInstance() { 58 WebCacheManager* WebCacheManager::GetInstance() {
59 return Singleton<WebCacheManager>::get(); 59 return base::Singleton<WebCacheManager>::get();
60 } 60 }
61 61
62 WebCacheManager::WebCacheManager() 62 WebCacheManager::WebCacheManager()
63 : global_size_limit_(GetDefaultGlobalSizeLimit()), 63 : global_size_limit_(GetDefaultGlobalSizeLimit()),
64 weak_factory_(this) { 64 weak_factory_(this) {
65 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED, 65 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
66 content::NotificationService::AllBrowserContextsAndSources()); 66 content::NotificationService::AllBrowserContextsAndSources());
67 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, 67 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
68 content::NotificationService::AllBrowserContextsAndSources()); 68 content::NotificationService::AllBrowserContextsAndSources());
69 } 69 }
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 inactive_renderers_.insert(*iter); 434 inactive_renderers_.insert(*iter);
435 active_renderers_.erase(*iter); 435 active_renderers_.erase(*iter);
436 iter = active_renderers_.begin(); 436 iter = active_renderers_.begin();
437 continue; 437 continue;
438 } 438 }
439 ++iter; 439 ++iter;
440 } 440 }
441 } 441 }
442 442
443 } // namespace web_cache 443 } // namespace web_cache
OLDNEW
« no previous file with comments | « components/web_cache/browser/web_cache_manager.h ('k') | components/wifi_sync/wifi_credential_syncable_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698