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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change Cookie Override API to not expose the CookieStoreMap. Created 7 years, 4 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) 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 "chrome/browser/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 23 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
24 #include "chrome/browser/extensions/extension_info_map.h" 24 #include "chrome/browser/extensions/extension_info_map.h"
25 #include "chrome/browser/extensions/extension_service.h" 25 #include "chrome/browser/extensions/extension_service.h"
26 #include "chrome/browser/extensions/extension_special_storage_policy.h" 26 #include "chrome/browser/extensions/extension_special_storage_policy.h"
27 #include "chrome/browser/extensions/extension_system.h" 27 #include "chrome/browser/extensions/extension_system.h"
28 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" 28 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
29 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h" 29 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h"
30 #include "chrome/browser/io_thread.h" 30 #include "chrome/browser/io_thread.h"
31 #include "chrome/browser/media/chrome_midi_permission_context.h" 31 #include "chrome/browser/media/chrome_midi_permission_context.h"
32 #include "chrome/browser/media/chrome_midi_permission_context_factory.h" 32 #include "chrome/browser/media/chrome_midi_permission_context_factory.h"
33 #include "chrome/browser/net/cookie_store_util.h"
33 #include "chrome/browser/net/pref_proxy_config_tracker.h" 34 #include "chrome/browser/net/pref_proxy_config_tracker.h"
34 #include "chrome/browser/net/proxy_service_factory.h" 35 #include "chrome/browser/net/proxy_service_factory.h"
35 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" 36 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
36 #include "chrome/browser/plugins/plugin_prefs.h" 37 #include "chrome/browser/plugins/plugin_prefs.h"
37 #include "chrome/browser/prefs/incognito_mode_prefs.h" 38 #include "chrome/browser/prefs/incognito_mode_prefs.h"
38 #include "chrome/browser/prefs/pref_service_syncable.h" 39 #include "chrome/browser/prefs/pref_service_syncable.h"
39 #include "chrome/browser/themes/theme_service.h" 40 #include "chrome/browser/themes/theme_service.h"
40 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 41 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
41 #include "chrome/common/chrome_constants.h" 42 #include "chrome/common/chrome_constants.h"
42 #include "chrome/common/chrome_paths.h" 43 #include "chrome/common/chrome_paths.h"
43 #include "chrome/common/chrome_switches.h" 44 #include "chrome/common/chrome_switches.h"
44 #include "chrome/common/extensions/extension.h" 45 #include "chrome/common/extensions/extension.h"
45 #include "chrome/common/pref_names.h" 46 #include "chrome/common/pref_names.h"
46 #include "chrome/common/render_messages.h" 47 #include "chrome/common/render_messages.h"
47 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h" 48 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h"
48 #include "components/user_prefs/user_prefs.h" 49 #include "components/user_prefs/user_prefs.h"
49 #include "content/public/browser/browser_thread.h" 50 #include "content/public/browser/browser_thread.h"
51 #include "content/public/browser/cookie_store_factory.h"
50 #include "content/public/browser/host_zoom_map.h" 52 #include "content/public/browser/host_zoom_map.h"
51 #include "content/public/browser/render_process_host.h" 53 #include "content/public/browser/render_process_host.h"
52 #include "content/public/browser/storage_partition.h" 54 #include "content/public/browser/storage_partition.h"
53 #include "content/public/browser/url_data_source.h" 55 #include "content/public/browser/url_data_source.h"
54 #include "content/public/browser/web_contents.h" 56 #include "content/public/browser/web_contents.h"
55 #include "net/http/http_server_properties.h" 57 #include "net/http/http_server_properties.h"
56 #include "net/http/transport_security_state.h" 58 #include "net/http/transport_security_state.h"
57 #include "webkit/browser/database/database_tracker.h" 59 #include "webkit/browser/database/database_tracker.h"
58 60
59 #if defined(OS_ANDROID) || defined(OS_IOS) 61 #if defined(OS_ANDROID) || defined(OS_IOS)
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 193
192 std::string OffTheRecordProfileImpl::GetProfileName() { 194 std::string OffTheRecordProfileImpl::GetProfileName() {
193 // Incognito profile should not return the profile name. 195 // Incognito profile should not return the profile name.
194 return std::string(); 196 return std::string();
195 } 197 }
196 198
197 base::FilePath OffTheRecordProfileImpl::GetPath() const { 199 base::FilePath OffTheRecordProfileImpl::GetPath() const {
198 return profile_->GetPath(); 200 return profile_->GetPath();
199 } 201 }
200 202
203 /*
204 content::CookieStoreConfig OffTheRecordProfileImpl::GetCookieStoreConfig() {
205 if (!cookie_delegate_) {
206 cookie_delegate_ = chrome_browser_net::CreateCookieDelegate(this);
207 }
208
209 return content::CookieStoreConfig::InMemoryWithOptions(
210 GetExtensionSpecialStoragePolicy(), cookie_delegate_);
211 }
212 */
213
201 scoped_refptr<base::SequencedTaskRunner> 214 scoped_refptr<base::SequencedTaskRunner>
202 OffTheRecordProfileImpl::GetIOTaskRunner() { 215 OffTheRecordProfileImpl::GetIOTaskRunner() {
203 return profile_->GetIOTaskRunner(); 216 return profile_->GetIOTaskRunner();
204 } 217 }
205 218
206 bool OffTheRecordProfileImpl::IsOffTheRecord() const { 219 bool OffTheRecordProfileImpl::IsOffTheRecord() const {
207 return true; 220 return true;
208 } 221 }
209 222
210 Profile* OffTheRecordProfileImpl::GetOffTheRecordProfile() { 223 Profile* OffTheRecordProfileImpl::GetOffTheRecordProfile() {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 const MIDISysExPermissionCallback& callback) { 308 const MIDISysExPermissionCallback& callback) {
296 ChromeMIDIPermissionContext* context = 309 ChromeMIDIPermissionContext* context =
297 ChromeMIDIPermissionContextFactory::GetForProfile(this); 310 ChromeMIDIPermissionContextFactory::GetForProfile(this);
298 context->RequestMIDISysExPermission(render_process_id, 311 context->RequestMIDISysExPermission(render_process_id,
299 render_view_id, 312 render_view_id,
300 requesting_frame, 313 requesting_frame,
301 callback); 314 callback);
302 } 315 }
303 316
304 net::URLRequestContextGetter* 317 net::URLRequestContextGetter*
305 OffTheRecordProfileImpl::GetRequestContextForExtensions() {
306 return io_data_.GetExtensionsRequestContextGetter().get();
307 }
308
309 net::URLRequestContextGetter*
310 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( 318 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition(
311 const base::FilePath& partition_path, 319 const base::FilePath& partition_path,
312 bool in_memory, 320 bool in_memory,
313 content::ProtocolHandlerMap* protocol_handlers) { 321 content::ProtocolHandlerMap* protocol_handlers) {
314 return io_data_.CreateIsolatedAppRequestContextGetter( 322 return io_data_.CreateIsolatedAppRequestContextGetter(
315 partition_path, in_memory, protocol_handlers).get(); 323 partition_path, in_memory, protocol_handlers).get();
316 } 324 }
317 325
318 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { 326 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() {
319 return io_data_.GetResourceContext(); 327 return io_data_.GetResourceContext();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 #if defined(OS_CHROMEOS) 498 #if defined(OS_CHROMEOS)
491 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 499 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
492 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 500 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
493 g_browser_process->local_state()); 501 g_browser_process->local_state());
494 } 502 }
495 #endif // defined(OS_CHROMEOS) 503 #endif // defined(OS_CHROMEOS)
496 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 504 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
497 GetPrefs(), g_browser_process->local_state()); 505 GetPrefs(), g_browser_process->local_state());
498 } 506 }
499 507
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/off_the_record_profile_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698