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