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

Side by Side Diff: chrome/browser/profiles/profile_io_data.h

Issue 7346024: Get rid of the ProfileId. It was added for ceee. I reverted the original change, since it led to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PROFILES_PROFILE_IO_DATA_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/debug/stack_trace.h" 11 #include "base/debug/stack_trace.h"
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
17 #include "chrome/browser/net/chrome_url_request_context.h" 17 #include "chrome/browser/net/chrome_url_request_context.h"
18 #include "chrome/browser/prefs/pref_member.h" 18 #include "chrome/browser/prefs/pref_member.h"
19 #include "chrome/browser/profiles/profile.h"
20 #include "content/browser/resource_context.h" 19 #include "content/browser/resource_context.h"
21 #include "net/base/cookie_monster.h" 20 #include "net/base/cookie_monster.h"
22 21
23 class CommandLine; 22 class CommandLine;
24 class ChromeAppCacheService; 23 class ChromeAppCacheService;
25 class ChromeBlobStorageContext; 24 class ChromeBlobStorageContext;
26 class DesktopNotificationService; 25 class DesktopNotificationService;
27 class ExtensionInfoMap; 26 class ExtensionInfoMap;
28 class HostContentSettingsMap; 27 class HostContentSettingsMap;
29 class HostZoomMap; 28 class HostZoomMap;
30 class IOThread; 29 class IOThread;
30 class Profile;
31 class ProtocolHandlerRegistry; 31 class ProtocolHandlerRegistry;
32 32
33 namespace fileapi { 33 namespace fileapi {
34 class FileSystemContext; 34 class FileSystemContext;
35 } // namespace fileapi 35 } // namespace fileapi
36 36
37 namespace net { 37 namespace net {
38 class DnsCertProvenanceChecker; 38 class DnsCertProvenanceChecker;
39 class NetLog; 39 class NetLog;
40 class ProxyConfigService; 40 class ProxyConfigService;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 scoped_refptr<fileapi::FileSystemContext> file_system_context; 144 scoped_refptr<fileapi::FileSystemContext> file_system_context;
145 scoped_refptr<quota::QuotaManager> quota_manager; 145 scoped_refptr<quota::QuotaManager> quota_manager;
146 scoped_refptr<ExtensionInfoMap> extension_info_map; 146 scoped_refptr<ExtensionInfoMap> extension_info_map;
147 DesktopNotificationService* notification_service; 147 DesktopNotificationService* notification_service;
148 base::WeakPtr<prerender::PrerenderManager> prerender_manager; 148 base::WeakPtr<prerender::PrerenderManager> prerender_manager;
149 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry; 149 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry;
150 // We need to initialize the ProxyConfigService from the UI thread 150 // We need to initialize the ProxyConfigService from the UI thread
151 // because on linux it relies on initializing things through gconf, 151 // because on linux it relies on initializing things through gconf,
152 // and needs to be on the main thread. 152 // and needs to be on the main thread.
153 scoped_ptr<net::ProxyConfigService> proxy_config_service; 153 scoped_ptr<net::ProxyConfigService> proxy_config_service;
154 // The profile this struct was populated from. 154 // The profile this struct was populated from. It's passed as a void* to
155 ProfileId profile_id; 155 // ensure it's not accidently used on the IO thread. Before using it on the
156 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive.
157 void* profile;
156 }; 158 };
157 159
158 explicit ProfileIOData(bool is_incognito); 160 explicit ProfileIOData(bool is_incognito);
159 virtual ~ProfileIOData(); 161 virtual ~ProfileIOData();
160 162
161 void InitializeProfileParams(Profile* profile); 163 void InitializeProfileParams(Profile* profile);
162 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; 164 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const;
163 165
164 // Lazy initializes the ProfileIOData object the first time a request context 166 // Lazy initializes the ProfileIOData object the first time a request context
165 // is requested. The lazy logic is implemented here. The actual initialization 167 // is requested. The lazy logic is implemented here. The actual initialization
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // Weak pointers to the request contexts. Only valid after LazyInitialize. 278 // Weak pointers to the request contexts. Only valid after LazyInitialize.
277 // These are weak so that they don't hold a reference to the RequestContext, 279 // These are weak so that they don't hold a reference to the RequestContext,
278 // because that holds a reference back to ProfileIOData. 280 // because that holds a reference back to ProfileIOData.
279 mutable base::WeakPtr<ChromeURLRequestContext> 281 mutable base::WeakPtr<ChromeURLRequestContext>
280 weak_extensions_request_context_; 282 weak_extensions_request_context_;
281 283
282 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 284 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
283 }; 285 };
284 286
285 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 287 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698