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

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

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address sky@'s comments. Created 6 years, 1 month 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 | Annotate | Revision Log
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 #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"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 PrefProxyConfigTracker* GetProxyConfigTracker() override; 77 PrefProxyConfigTracker* GetProxyConfigTracker() override;
78 78
79 chrome_browser_net::Predictor* GetNetworkPredictor() override; 79 chrome_browser_net::Predictor* GetNetworkPredictor() override;
80 DevToolsNetworkController* GetDevToolsNetworkController() override; 80 DevToolsNetworkController* GetDevToolsNetworkController() override;
81 void ClearNetworkingHistorySince(base::Time time, 81 void ClearNetworkingHistorySince(base::Time time,
82 const base::Closure& completion) override; 82 const base::Closure& completion) override;
83 GURL GetHomePage() override; 83 GURL GetHomePage() override;
84 84
85 // content::BrowserContext implementation: 85 // content::BrowserContext implementation:
86 base::FilePath GetPath() const override; 86 base::FilePath GetPath() const override;
87 scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
88 const base::FilePath& partition_path) override;
87 scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; 89 scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
88 bool IsOffTheRecord() const override; 90 bool IsOffTheRecord() const override;
89 content::DownloadManagerDelegate* GetDownloadManagerDelegate() override; 91 content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
90 net::URLRequestContextGetter* GetRequestContext() override; 92 net::URLRequestContextGetter* GetRequestContext() override;
91 net::URLRequestContextGetter* GetRequestContextForRenderProcess( 93 net::URLRequestContextGetter* GetRequestContextForRenderProcess(
92 int renderer_child_id) override; 94 int renderer_child_id) override;
93 net::URLRequestContextGetter* GetMediaRequestContext() override; 95 net::URLRequestContextGetter* GetMediaRequestContext() override;
94 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 96 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
95 int renderer_child_id) override; 97 int renderer_child_id) override;
96 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( 98 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
97 const base::FilePath& partition_path, 99 const base::FilePath& partition_path,
98 bool in_memory) override; 100 bool in_memory) override;
99 content::ResourceContext* GetResourceContext() override; 101 content::ResourceContext* GetResourceContext() override;
100 content::BrowserPluginGuestManager* GetGuestManager() override; 102 content::BrowserPluginGuestManager* GetGuestManager() override;
101 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; 103 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
102 content::PushMessagingService* GetPushMessagingService() override; 104 content::PushMessagingService* GetPushMessagingService() override;
103 content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; 105 content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
104 106
105 private: 107 private:
106 FRIEND_TEST_ALL_PREFIXES(OffTheRecordProfileImplTest, GetHostZoomMap);
107 void InitIoData(); 108 void InitIoData();
108 void InitHostZoomMap(); 109 // Allows a profile to track changes in zoom levels in its parent profile.
Bernhard Bauer 2014/11/12 10:39:20 Nit: Blank lines before comments?
wjmaclean 2014/11/12 15:12:55 Done.
110 void TrackZoomLevelsFromParent();
109 111
110 #if defined(OS_ANDROID) || defined(OS_IOS) 112 #if defined(OS_ANDROID) || defined(OS_IOS)
111 void UseSystemProxy(); 113 void UseSystemProxy();
112 #endif // defined(OS_ANDROID) || defined(OS_IOS) 114 #endif // defined(OS_ANDROID) || defined(OS_IOS)
113 115
114 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
115 PrefProxyConfigTracker* CreateProxyConfigTracker(); 116 PrefProxyConfigTracker* CreateProxyConfigTracker();
117 // Callback function for tracking parent's zoom level changes.
118 void OnParentZoomLevelChanged(
119 const content::HostZoomMap::ZoomLevelChange& change);
116 120
117 // The real underlying profile. 121 // The real underlying profile.
118 Profile* profile_; 122 Profile* profile_;
119 123
120 // Weak pointer owned by |profile_|. 124 // Weak pointer owned by |profile_|.
121 PrefServiceSyncable* prefs_; 125 PrefServiceSyncable* prefs_;
122 126
127 scoped_ptr<content::HostZoomMap::Subscription> track_zoom_subscription_;
123 scoped_ptr<OffTheRecordProfileIOData::Handle> io_data_; 128 scoped_ptr<OffTheRecordProfileIOData::Handle> io_data_;
124 129
125 // We use a non-persistent content settings map for OTR. 130 // We use a non-persistent content settings map for OTR.
126 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 131 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
127 132
128 // Time we were started. 133 // Time we were started.
129 Time start_time_; 134 Time start_time_;
130 135
131 base::FilePath last_selected_directory_; 136 base::FilePath last_selected_directory_;
132 137
133 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; 138 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
134 139
135 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
136
137 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); 140 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
138 }; 141 };
139 142
140 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ 143 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698