| OLD | NEW |
| 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_OFF_THE_RECORD_PROFILE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ |
| 6 #define CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ | 6 #define CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" | 11 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/browser_list.h" | 13 #include "chrome/browser/ui/browser_list.h" |
| 14 #include "content/public/browser/host_zoom_map.h" | 14 #include "content/public/browser/host_zoom_map.h" |
| 15 | 15 |
| 16 using base::Time; | 16 using base::Time; |
| 17 using base::TimeDelta; | 17 using base::TimeDelta; |
| 18 | 18 |
| 19 class PrefServiceSyncable; |
| 20 |
| 19 //////////////////////////////////////////////////////////////////////////////// | 21 //////////////////////////////////////////////////////////////////////////////// |
| 20 // | 22 // |
| 21 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile | 23 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile |
| 22 // to make it suitable for the incognito mode. | 24 // to make it suitable for the incognito mode. |
| 23 // | 25 // |
| 24 // Note: This class is a leaf class and is not intended for subclassing. | 26 // Note: This class is a leaf class and is not intended for subclassing. |
| 25 // Providing this header file is for unit testing. | 27 // Providing this header file is for unit testing. |
| 26 // | 28 // |
| 27 //////////////////////////////////////////////////////////////////////////////// | 29 //////////////////////////////////////////////////////////////////////////////// |
| 28 class OffTheRecordProfileImpl : public Profile { | 30 class OffTheRecordProfileImpl : public Profile { |
| 29 public: | 31 public: |
| 30 explicit OffTheRecordProfileImpl(Profile* real_profile); | 32 explicit OffTheRecordProfileImpl(Profile* real_profile); |
| 31 virtual ~OffTheRecordProfileImpl(); | 33 virtual ~OffTheRecordProfileImpl(); |
| 32 void Init(); | 34 void Init(); |
| 33 | 35 |
| 34 // Profile implementation. | 36 // Profile implementation. |
| 35 virtual std::string GetProfileName() OVERRIDE; | 37 virtual std::string GetProfileName() OVERRIDE; |
| 36 virtual Profile* GetOffTheRecordProfile() OVERRIDE; | 38 virtual Profile* GetOffTheRecordProfile() OVERRIDE; |
| 37 virtual void DestroyOffTheRecordProfile() OVERRIDE; | 39 virtual void DestroyOffTheRecordProfile() OVERRIDE; |
| 38 virtual bool HasOffTheRecordProfile() OVERRIDE; | 40 virtual bool HasOffTheRecordProfile() OVERRIDE; |
| 39 virtual Profile* GetOriginalProfile() OVERRIDE; | 41 virtual Profile* GetOriginalProfile() OVERRIDE; |
| 40 virtual ExtensionService* GetExtensionService() OVERRIDE; | 42 virtual ExtensionService* GetExtensionService() OVERRIDE; |
| 41 virtual ExtensionSpecialStoragePolicy* | 43 virtual ExtensionSpecialStoragePolicy* |
| 42 GetExtensionSpecialStoragePolicy() OVERRIDE; | 44 GetExtensionSpecialStoragePolicy() OVERRIDE; |
| 43 virtual policy::ManagedModePolicyProvider* | 45 virtual policy::ManagedModePolicyProvider* |
| 44 GetManagedModePolicyProvider() OVERRIDE; | 46 GetManagedModePolicyProvider() OVERRIDE; |
| 45 virtual policy::PolicyService* GetPolicyService() OVERRIDE; | 47 virtual policy::PolicyService* GetPolicyService() OVERRIDE; |
| 46 virtual PrefServiceSyncable* GetPrefs() OVERRIDE; | 48 virtual PrefService* GetPrefs() OVERRIDE; |
| 47 virtual PrefServiceSyncable* GetOffTheRecordPrefs() OVERRIDE; | 49 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE; |
| 48 virtual net::URLRequestContextGetter* | 50 virtual net::URLRequestContextGetter* |
| 49 GetRequestContextForExtensions() OVERRIDE; | 51 GetRequestContextForExtensions() OVERRIDE; |
| 50 virtual net::URLRequestContextGetter* CreateRequestContext( | 52 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 51 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 53 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 52 blob_protocol_handler, | 54 blob_protocol_handler, |
| 53 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 55 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 54 file_system_protocol_handler, | 56 file_system_protocol_handler, |
| 55 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 57 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 56 developer_protocol_handler, | 58 developer_protocol_handler, |
| 57 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 59 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 base::FilePath last_selected_directory_; | 153 base::FilePath last_selected_directory_; |
| 152 | 154 |
| 153 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 155 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
| 154 | 156 |
| 155 content::HostZoomMap::ZoomLevelChangedCallback zoom_callback_; | 157 content::HostZoomMap::ZoomLevelChangedCallback zoom_callback_; |
| 156 | 158 |
| 157 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); | 159 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); |
| 158 }; | 160 }; |
| 159 | 161 |
| 160 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ | 162 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ |
| OLD | NEW |