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

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

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/certificate_viewer.cc ('k') | chrome/browser/chrome_plugin_browsing_context.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 #ifndef CHROME_BROWSER_CHROME_PLUGIN_BROWSING_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_CHROME_PLUGIN_BROWSING_CONTEXT_H_
6 #define CHROME_BROWSER_CHROME_PLUGIN_BROWSING_CONTEXT_H_ 6 #define CHROME_BROWSER_CHROME_PLUGIN_BROWSING_CONTEXT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "base/id_map.h" 11 #include "base/id_map.h"
12 #include "chrome/common/chrome_plugin_api.h" 12 #include "chrome/common/chrome_plugin_api.h"
13 #include "chrome/common/notification_observer.h" 13 #include "chrome/common/notification_observer.h"
14 #include "chrome/common/notification_registrar.h" 14 #include "chrome/common/notification_registrar.h"
15 15
16 class URLRequestContext; 16 class URLRequestContext;
17 17
18 // This class manages the mapping between CPBrowsingContexts and 18 // This class manages the mapping between CPBrowsingContexts and
19 // URLRequestContexts. It observes when URLRequestContexts go away, and 19 // URLRequestContexts. It observes when URLRequestContexts go away, and
20 // invalidates the corresponding CPBrowsingContexts. CPBrowsingContexts can be 20 // invalidates the corresponding CPBrowsingContexts. CPBrowsingContexts can be
21 // associated with other data as well, so there can be multiple ones referring 21 // associated with other data as well, so there can be multiple ones referring
22 // to a given URLRequestContext. 22 // to a given URLRequestContext.
23 // Note: This class should be used on the IO thread only. 23 // Note: This class should be used on the IO thread only.
24 class CPBrowsingContextManager : public NotificationObserver { 24 class CPBrowsingContextManager : public NotificationObserver {
25 public: 25 public:
26 static CPBrowsingContextManager* Instance(); 26 static CPBrowsingContextManager* GetInstance();
27 27
28 // Note: don't call these directly - use Instance() above. They are public 28 // Note: don't call these directly - use Instance() above. They are public
29 // so Singleton can access them. 29 // so Singleton can access them.
30 CPBrowsingContextManager(); 30 CPBrowsingContextManager();
31 ~CPBrowsingContextManager(); 31 ~CPBrowsingContextManager();
32 32
33 // Generate a new unique CPBrowsingContext ID from the given 33 // Generate a new unique CPBrowsingContext ID from the given
34 // URLRequestContext. Multiple CPBrowsingContexts can map to the same 34 // URLRequestContext. Multiple CPBrowsingContexts can map to the same
35 // URLRequestContext. 35 // URLRequestContext.
36 CPBrowsingContext Allocate(URLRequestContext* context); 36 CPBrowsingContext Allocate(URLRequestContext* context);
(...skipping 16 matching lines...) Expand all
53 typedef IDMap<URLRequestContext> Map; 53 typedef IDMap<URLRequestContext> Map;
54 typedef std::map<URLRequestContext*, CPBrowsingContext> ReverseMap; 54 typedef std::map<URLRequestContext*, CPBrowsingContext> ReverseMap;
55 55
56 NotificationRegistrar registrar_; 56 NotificationRegistrar registrar_;
57 57
58 Map map_; // map of CPBrowsingContext -> URLRequestContext 58 Map map_; // map of CPBrowsingContext -> URLRequestContext
59 ReverseMap reverse_map_; // map of URLRequestContext -> CPBrowsingContext 59 ReverseMap reverse_map_; // map of URLRequestContext -> CPBrowsingContext
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_CHROME_PLUGIN_BROWSING_CONTEXT_H_ 62 #endif // CHROME_BROWSER_CHROME_PLUGIN_BROWSING_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/certificate_viewer.cc ('k') | chrome/browser/chrome_plugin_browsing_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698