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

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

Issue 1011953003: Refactor Permissions related method out of ContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_type_enum_class
Patch Set: fix cros Created 5 years, 8 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/prefs/json_pref_store.h" 12 #include "base/prefs/json_pref_store.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/background/background_contents_service_factory.h" 16 #include "chrome/browser/background/background_contents_service_factory.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/dom_distiller/profile_utils.h" 18 #include "chrome/browser/dom_distiller/profile_utils.h"
19 #include "chrome/browser/download/chrome_download_manager_delegate.h" 19 #include "chrome/browser/download/chrome_download_manager_delegate.h"
20 #include "chrome/browser/download/download_service.h" 20 #include "chrome/browser/download/download_service.h"
21 #include "chrome/browser/download/download_service_factory.h" 21 #include "chrome/browser/download/download_service_factory.h"
22 #include "chrome/browser/io_thread.h" 22 #include "chrome/browser/io_thread.h"
23 #include "chrome/browser/net/chrome_url_request_context_getter.h" 23 #include "chrome/browser/net/chrome_url_request_context_getter.h"
24 #include "chrome/browser/net/pref_proxy_config_tracker.h" 24 #include "chrome/browser/net/pref_proxy_config_tracker.h"
25 #include "chrome/browser/net/proxy_service_factory.h" 25 #include "chrome/browser/net/proxy_service_factory.h"
26 #include "chrome/browser/permissions/permission_manager.h"
27 #include "chrome/browser/permissions/permission_manager_factory.h"
26 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" 28 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
27 #include "chrome/browser/plugins/plugin_prefs.h" 29 #include "chrome/browser/plugins/plugin_prefs.h"
28 #include "chrome/browser/prefs/incognito_mode_prefs.h" 30 #include "chrome/browser/prefs/incognito_mode_prefs.h"
29 #include "chrome/browser/prefs/pref_service_syncable.h" 31 #include "chrome/browser/prefs/pref_service_syncable.h"
30 #include "chrome/browser/profiles/profile_manager.h" 32 #include "chrome/browser/profiles/profile_manager.h"
31 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" 33 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
32 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" 34 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h"
33 #include "chrome/browser/themes/theme_service.h" 35 #include "chrome/browser/themes/theme_service.h"
34 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 36 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
35 #include "chrome/browser/ui/zoom/chrome_zoom_level_otr_delegate.h" 37 #include "chrome/browser/ui/zoom/chrome_zoom_level_otr_delegate.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 OffTheRecordProfileImpl::GetPushMessagingService() { 434 OffTheRecordProfileImpl::GetPushMessagingService() {
433 // TODO(johnme): Support push messaging in incognito if possible. 435 // TODO(johnme): Support push messaging in incognito if possible.
434 return NULL; 436 return NULL;
435 } 437 }
436 438
437 content::SSLHostStateDelegate* 439 content::SSLHostStateDelegate*
438 OffTheRecordProfileImpl::GetSSLHostStateDelegate() { 440 OffTheRecordProfileImpl::GetSSLHostStateDelegate() {
439 return ChromeSSLHostStateDelegateFactory::GetForProfile(this); 441 return ChromeSSLHostStateDelegateFactory::GetForProfile(this);
440 } 442 }
441 443
444 // TODO(mlamouri): we should all these BrowserContext implementation to Profile
445 // instead of repeating them inside all Profile implementations.
446 content::PermissionManager* OffTheRecordProfileImpl::GetPermissionManager() {
447 return PermissionManagerFactory::GetForProfile(this);
448 }
449
442 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { 450 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) {
443 return (profile == this) || (profile == profile_); 451 return (profile == this) || (profile == profile_);
444 } 452 }
445 453
446 Time OffTheRecordProfileImpl::GetStartTime() const { 454 Time OffTheRecordProfileImpl::GetStartTime() const {
447 return start_time_; 455 return start_time_;
448 } 456 }
449 457
450 void OffTheRecordProfileImpl::SetExitType(ExitType exit_type) { 458 void OffTheRecordProfileImpl::SetExitType(ExitType exit_type) {
451 } 459 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 592 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
585 #if defined(OS_CHROMEOS) 593 #if defined(OS_CHROMEOS)
586 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 594 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
587 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 595 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
588 g_browser_process->local_state()); 596 g_browser_process->local_state());
589 } 597 }
590 #endif // defined(OS_CHROMEOS) 598 #endif // defined(OS_CHROMEOS)
591 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 599 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
592 GetPrefs(), g_browser_process->local_state()); 600 GetPrefs(), g_browser_process->local_state());
593 } 601 }
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