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

Side by Side Diff: chrome/browser/chrome_plugin_browsing_context.cc

Issue 5685007: Rename all methods accessing Singleton<T> as GetInstance(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_plugin_browsing_context.h ('k') | chrome/browser/chrome_plugin_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/chrome_plugin_browsing_context.h" 5 #include "chrome/browser/chrome_plugin_browsing_context.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/singleton.h" 8 #include "base/singleton.h"
9 #include "chrome/browser/browser_thread.h" 9 #include "chrome/browser/browser_thread.h"
10 #include "chrome/common/notification_service.h" 10 #include "chrome/common/notification_service.h"
11 11
12 CPBrowsingContextManager* CPBrowsingContextManager::Instance() { 12 CPBrowsingContextManager* CPBrowsingContextManager::GetInstance() {
13 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 13 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
14 return Singleton<CPBrowsingContextManager>::get(); 14 return Singleton<CPBrowsingContextManager>::get();
15 } 15 }
16 16
17 CPBrowsingContextManager::CPBrowsingContextManager() { 17 CPBrowsingContextManager::CPBrowsingContextManager() {
18 registrar_.Add(this, NotificationType::URL_REQUEST_CONTEXT_RELEASED, 18 registrar_.Add(this, NotificationType::URL_REQUEST_CONTEXT_RELEASED,
19 NotificationService::AllSources()); 19 NotificationService::AllSources());
20 } 20 }
21 21
22 CPBrowsingContextManager::~CPBrowsingContextManager() { 22 CPBrowsingContextManager::~CPBrowsingContextManager() {
(...skipping 29 matching lines...) Expand all
52 URLRequestContext* context = Source<URLRequestContext>(source).ptr(); 52 URLRequestContext* context = Source<URLRequestContext>(source).ptr();
53 53
54 // Multiple CPBrowsingContexts may refer to the same URLRequestContext. 54 // Multiple CPBrowsingContexts may refer to the same URLRequestContext.
55 for (Map::iterator it(&map_); !it.IsAtEnd(); it.Advance()) { 55 for (Map::iterator it(&map_); !it.IsAtEnd(); it.Advance()) {
56 if (it.GetCurrentValue() == context) 56 if (it.GetCurrentValue() == context)
57 map_.Remove(it.GetCurrentKey()); 57 map_.Remove(it.GetCurrentKey());
58 } 58 }
59 59
60 reverse_map_.erase(context); 60 reverse_map_.erase(context);
61 } 61 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_plugin_browsing_context.h ('k') | chrome/browser/chrome_plugin_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698