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

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

Issue 10546083: Convert ProtocolHandlerRegistry to be a ProfileKeyedService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Respond to Elliot's comments. Created 8 years, 6 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 #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 <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "chrome/browser/net/chrome_url_request_context.h" 18 #include "chrome/browser/net/chrome_url_request_context.h"
19 #include "chrome/browser/prefs/pref_member.h" 19 #include "chrome/browser/prefs/pref_member.h"
20 #include "content/public/browser/resource_context.h" 20 #include "content/public/browser/resource_context.h"
21 #include "net/cookies/cookie_monster.h" 21 #include "net/cookies/cookie_monster.h"
22 #include "net/url_request/url_request_job_factory.h"
22 23
23 class CookieSettings; 24 class CookieSettings;
24 class DesktopNotificationService; 25 class DesktopNotificationService;
25 class ExtensionInfoMap; 26 class ExtensionInfoMap;
26 class HostContentSettingsMap; 27 class HostContentSettingsMap;
27 class IOThread; 28 class IOThread;
28 class Profile; 29 class Profile;
29 class ProtocolHandlerRegistry; 30 class ProtocolHandlerRegistry;
30 class TransportSecurityPersister; 31 class TransportSecurityPersister;
31 32
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 IOThread* io_thread; 152 IOThread* io_thread;
152 scoped_refptr<CookieSettings> cookie_settings; 153 scoped_refptr<CookieSettings> cookie_settings;
153 scoped_refptr<net::SSLConfigService> ssl_config_service; 154 scoped_refptr<net::SSLConfigService> ssl_config_service;
154 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; 155 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate;
155 scoped_refptr<ExtensionInfoMap> extension_info_map; 156 scoped_refptr<ExtensionInfoMap> extension_info_map;
156 157
157 #if defined(ENABLE_NOTIFICATIONS) 158 #if defined(ENABLE_NOTIFICATIONS)
158 DesktopNotificationService* notification_service; 159 DesktopNotificationService* notification_service;
159 #endif 160 #endif
160 161
161 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry; 162 // This pointer exists only as a means of conveying the
163 // pointer from the factory on the UI thread to the consumer
164 // (URLRequestJobFactory) on the IO thread. Once delivered,
165 // URLRequestJobFactory assumes ownership of the pointer.
166 net::URLRequestJobFactory::Interceptor* protocol_handler_url_interceptor;
willchan no longer on Chromium 2012/06/22 19:01:56 I believe this will lead to leaks. Sometimes we cr
Steve McKay 2012/06/27 21:49:28 Great tip. Done!
167
162 // We need to initialize the ProxyConfigService from the UI thread 168 // We need to initialize the ProxyConfigService from the UI thread
163 // because on linux it relies on initializing things through gconf, 169 // because on linux it relies on initializing things through gconf,
164 // and needs to be on the main thread. 170 // and needs to be on the main thread.
165 scoped_ptr<net::ProxyConfigService> proxy_config_service; 171 scoped_ptr<net::ProxyConfigService> proxy_config_service;
166 // The profile this struct was populated from. It's passed as a void* to 172 // The profile this struct was populated from. It's passed as a void* to
167 // ensure it's not accidently used on the IO thread. Before using it on the 173 // ensure it's not accidently used on the IO thread. Before using it on the
168 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. 174 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive.
169 void* profile; 175 void* profile;
170 }; 176 };
171 177
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 353
348 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 354 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
349 bool initialized_on_UI_thread_; 355 bool initialized_on_UI_thread_;
350 356
351 bool is_incognito_; 357 bool is_incognito_;
352 358
353 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 359 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
354 }; 360 };
355 361
356 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 362 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698