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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 bool in_memory) OVERRIDE; | 102 bool in_memory) OVERRIDE; |
104 virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 103 virtual content::ResourceContext* GetResourceContext() OVERRIDE; |
105 virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; | 104 virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; |
106 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 105 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
107 virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; | 106 virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; |
108 virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE; | 107 virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE; |
109 | 108 |
110 private: | 109 private: |
111 FRIEND_TEST_ALL_PREFIXES(OffTheRecordProfileImplTest, GetHostZoomMap); | 110 FRIEND_TEST_ALL_PREFIXES(OffTheRecordProfileImplTest, GetHostZoomMap); |
112 void InitIoData(); | 111 void InitIoData(); |
113 void InitHostZoomMap(); | |
114 | 112 |
115 #if defined(OS_ANDROID) || defined(OS_IOS) | 113 #if defined(OS_ANDROID) || defined(OS_IOS) |
116 void UseSystemProxy(); | 114 void UseSystemProxy(); |
117 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 115 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
118 | 116 |
119 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | |
120 PrefProxyConfigTracker* CreateProxyConfigTracker(); | 117 PrefProxyConfigTracker* CreateProxyConfigTracker(); |
121 | 118 |
122 // The real underlying profile. | 119 // The real underlying profile. |
123 Profile* profile_; | 120 Profile* profile_; |
124 | 121 |
125 // Weak pointer owned by |profile_|. | 122 // Weak pointer owned by |profile_|. |
126 PrefServiceSyncable* prefs_; | 123 PrefServiceSyncable* prefs_; |
127 | 124 |
128 scoped_ptr<OffTheRecordProfileIOData::Handle> io_data_; | 125 scoped_ptr<OffTheRecordProfileIOData::Handle> io_data_; |
129 | 126 |
130 // We use a non-persistent content settings map for OTR. | 127 // We use a non-persistent content settings map for OTR. |
131 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 128 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
132 | 129 |
133 // Time we were started. | 130 // Time we were started. |
134 Time start_time_; | 131 Time start_time_; |
135 | 132 |
136 base::FilePath last_selected_directory_; | 133 base::FilePath last_selected_directory_; |
137 | 134 |
138 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 135 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
139 | 136 |
140 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | |
141 | |
142 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); | 137 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); |
143 }; | 138 }; |
144 | 139 |
145 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ | 140 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ |
OLD | NEW |