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 "components/domain_reliability/clear_mode.h" | 14 #include "components/domain_reliability/clear_mode.h" |
15 #include "content/public/browser/content_browser_client.h" | 15 #include "content/public/browser/content_browser_client.h" |
16 #include "content/public/browser/host_zoom_map.h" | |
17 | 16 |
18 using base::Time; | 17 using base::Time; |
19 using base::TimeDelta; | 18 using base::TimeDelta; |
20 | 19 |
21 class PrefServiceSyncable; | 20 class PrefServiceSyncable; |
22 | 21 |
23 //////////////////////////////////////////////////////////////////////////////// | 22 //////////////////////////////////////////////////////////////////////////////// |
24 // | 23 // |
25 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile | 24 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile |
26 // to make it suitable for the incognito mode. | 25 // to make it suitable for the incognito mode. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE; | 78 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE; |
80 | 79 |
81 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; | 80 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE; |
82 virtual DevToolsNetworkController* GetDevToolsNetworkController() OVERRIDE; | 81 virtual DevToolsNetworkController* GetDevToolsNetworkController() OVERRIDE; |
83 virtual void ClearNetworkingHistorySince( | 82 virtual void ClearNetworkingHistorySince( |
84 base::Time time, | 83 base::Time time, |
85 const base::Closure& completion) OVERRIDE; | 84 const base::Closure& completion) OVERRIDE; |
86 virtual GURL GetHomePage() OVERRIDE; | 85 virtual GURL GetHomePage() OVERRIDE; |
87 | 86 |
88 // content::BrowserContext implementation: | 87 // content::BrowserContext implementation: |
| 88 virtual double GetDefaultZoomLevel() const OVERRIDE; |
89 virtual base::FilePath GetPath() const OVERRIDE; | 89 virtual base::FilePath GetPath() const OVERRIDE; |
90 virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() OVERRIDE; | 90 virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() OVERRIDE; |
91 virtual bool IsOffTheRecord() const OVERRIDE; | 91 virtual bool IsOffTheRecord() const OVERRIDE; |
92 virtual content::DownloadManagerDelegate* | 92 virtual content::DownloadManagerDelegate* |
93 GetDownloadManagerDelegate() OVERRIDE; | 93 GetDownloadManagerDelegate() OVERRIDE; |
94 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 94 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
95 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 95 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
96 int renderer_child_id) OVERRIDE; | 96 int renderer_child_id) OVERRIDE; |
97 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; | 97 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; |
98 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 98 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
99 int renderer_child_id) OVERRIDE; | 99 int renderer_child_id) OVERRIDE; |
100 virtual net::URLRequestContextGetter* | 100 virtual net::URLRequestContextGetter* |
101 GetMediaRequestContextForStoragePartition( | 101 GetMediaRequestContextForStoragePartition( |
102 const base::FilePath& partition_path, | 102 const base::FilePath& partition_path, |
103 bool in_memory) OVERRIDE; | 103 bool in_memory) OVERRIDE; |
104 virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 104 virtual content::ResourceContext* GetResourceContext() OVERRIDE; |
105 virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; | 105 virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; |
106 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 106 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
107 virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; | 107 virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; |
108 virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE; | 108 virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE; |
109 | 109 |
110 private: | 110 private: |
111 FRIEND_TEST_ALL_PREFIXES(OffTheRecordProfileImplTest, GetHostZoomMap); | 111 FRIEND_TEST_ALL_PREFIXES(OffTheRecordProfileImplTest, GetHostZoomMap); |
112 void InitIoData(); | 112 void InitIoData(); |
113 void InitHostZoomMap(); | |
114 | 113 |
115 #if defined(OS_ANDROID) || defined(OS_IOS) | 114 #if defined(OS_ANDROID) || defined(OS_IOS) |
116 void UseSystemProxy(); | 115 void UseSystemProxy(); |
117 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 116 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
118 | 117 |
119 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | |
120 PrefProxyConfigTracker* CreateProxyConfigTracker(); | 118 PrefProxyConfigTracker* CreateProxyConfigTracker(); |
121 | 119 |
122 // The real underlying profile. | 120 // The real underlying profile. |
123 Profile* profile_; | 121 Profile* profile_; |
124 | 122 |
125 // Weak pointer owned by |profile_|. | 123 // Weak pointer owned by |profile_|. |
126 PrefServiceSyncable* prefs_; | 124 PrefServiceSyncable* prefs_; |
127 | 125 |
128 scoped_ptr<OffTheRecordProfileIOData::Handle> io_data_; | 126 scoped_ptr<OffTheRecordProfileIOData::Handle> io_data_; |
129 | 127 |
130 // We use a non-persistent content settings map for OTR. | 128 // We use a non-persistent content settings map for OTR. |
131 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 129 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
132 | 130 |
133 // Time we were started. | 131 // Time we were started. |
134 Time start_time_; | 132 Time start_time_; |
135 | 133 |
136 base::FilePath last_selected_directory_; | 134 base::FilePath last_selected_directory_; |
137 | 135 |
138 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 136 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
139 | 137 |
140 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | |
141 | |
142 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); | 138 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); |
143 }; | 139 }; |
144 | 140 |
145 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ | 141 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ |
OLD | NEW |