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

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

Issue 258373002: Towards moving guest management to chrome: Introduce GuestViewManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android build Created 6 years, 7 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 #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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/prefs/json_pref_store.h" 13 #include "base/prefs/json_pref_store.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/browser/background/background_contents_service_factory.h" 17 #include "chrome/browser/background/background_contents_service_factory.h"
18 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/content_settings/host_content_settings_map.h" 19 #include "chrome/browser/content_settings/host_content_settings_map.h"
20 #include "chrome/browser/download/chrome_download_manager_delegate.h" 20 #include "chrome/browser/download/chrome_download_manager_delegate.h"
21 #include "chrome/browser/download/download_service.h" 21 #include "chrome/browser/download/download_service.h"
22 #include "chrome/browser/download/download_service_factory.h" 22 #include "chrome/browser/download/download_service_factory.h"
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_service.h" 24 #include "chrome/browser/extensions/extension_service.h"
25 #include "chrome/browser/extensions/extension_special_storage_policy.h" 25 #include "chrome/browser/extensions/extension_special_storage_policy.h"
26 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" 26 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
27 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h" 27 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h"
28 #include "chrome/browser/guest_view/guest_view_manager.h"
28 #include "chrome/browser/io_thread.h" 29 #include "chrome/browser/io_thread.h"
29 #include "chrome/browser/media/chrome_midi_permission_context.h" 30 #include "chrome/browser/media/chrome_midi_permission_context.h"
30 #include "chrome/browser/media/chrome_midi_permission_context_factory.h" 31 #include "chrome/browser/media/chrome_midi_permission_context_factory.h"
31 #include "chrome/browser/net/pref_proxy_config_tracker.h" 32 #include "chrome/browser/net/pref_proxy_config_tracker.h"
32 #include "chrome/browser/net/proxy_service_factory.h" 33 #include "chrome/browser/net/proxy_service_factory.h"
33 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" 34 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
34 #include "chrome/browser/plugins/plugin_prefs.h" 35 #include "chrome/browser/plugins/plugin_prefs.h"
35 #include "chrome/browser/prefs/incognito_mode_prefs.h" 36 #include "chrome/browser/prefs/incognito_mode_prefs.h"
36 #include "chrome/browser/prefs/pref_service_syncable.h" 37 #include "chrome/browser/prefs/pref_service_syncable.h"
37 #include "chrome/browser/themes/theme_service.h" 38 #include "chrome/browser/themes/theme_service.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 #endif 417 #endif
417 } 418 }
418 return host_content_settings_map_.get(); 419 return host_content_settings_map_.get();
419 } 420 }
420 421
421 content::GeolocationPermissionContext* 422 content::GeolocationPermissionContext*
422 OffTheRecordProfileImpl::GetGeolocationPermissionContext() { 423 OffTheRecordProfileImpl::GetGeolocationPermissionContext() {
423 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); 424 return ChromeGeolocationPermissionContextFactory::GetForProfile(this);
424 } 425 }
425 426
427 content::BrowserPluginGuestManagerDelegate*
428 OffTheRecordProfileImpl::GetGuestManagerDelegate() {
429 return GuestViewManager::FromBrowserContext(this);
430 }
431
426 quota::SpecialStoragePolicy* 432 quota::SpecialStoragePolicy*
427 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { 433 OffTheRecordProfileImpl::GetSpecialStoragePolicy() {
428 return GetExtensionSpecialStoragePolicy(); 434 return GetExtensionSpecialStoragePolicy();
429 } 435 }
430 436
431 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { 437 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) {
432 return (profile == this) || (profile == profile_); 438 return (profile == this) || (profile == profile_);
433 } 439 }
434 440
435 Time OffTheRecordProfileImpl::GetStartTime() const { 441 Time OffTheRecordProfileImpl::GetStartTime() const {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 574 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
569 #if defined(OS_CHROMEOS) 575 #if defined(OS_CHROMEOS)
570 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 576 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
571 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 577 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
572 g_browser_process->local_state()); 578 g_browser_process->local_state());
573 } 579 }
574 #endif // defined(OS_CHROMEOS) 580 #endif // defined(OS_CHROMEOS)
575 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 581 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
576 GetPrefs(), g_browser_process->local_state()); 582 GetPrefs(), g_browser_process->local_state());
577 } 583 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698