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

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 comments; patch for landing. 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
110 // Allows a profile to track changes in zoom levels in its parent profile.
111 void TrackZoomLevelsFromParent();
109 112
110 #if defined(OS_ANDROID) || defined(OS_IOS) 113 #if defined(OS_ANDROID) || defined(OS_IOS)
111 void UseSystemProxy(); 114 void UseSystemProxy();
112 #endif // defined(OS_ANDROID) || defined(OS_IOS) 115 #endif // defined(OS_ANDROID) || defined(OS_IOS)
113 116
114 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
115 PrefProxyConfigTracker* CreateProxyConfigTracker(); 117 PrefProxyConfigTracker* CreateProxyConfigTracker();
118 // Callback function for tracking parent's zoom level changes.
119 void OnParentZoomLevelChanged(
120 const content::HostZoomMap::ZoomLevelChange& change);
116 121
117 // The real underlying profile. 122 // The real underlying profile.
118 Profile* profile_; 123 Profile* profile_;
119 124
120 // Weak pointer owned by |profile_|. 125 // Weak pointer owned by |profile_|.
121 PrefServiceSyncable* prefs_; 126 PrefServiceSyncable* prefs_;
122 127
128 scoped_ptr<content::HostZoomMap::Subscription> track_zoom_subscription_;
123 scoped_ptr<OffTheRecordProfileIOData::Handle> io_data_; 129 scoped_ptr<OffTheRecordProfileIOData::Handle> io_data_;
124 130
125 // We use a non-persistent content settings map for OTR. 131 // We use a non-persistent content settings map for OTR.
126 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 132 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
127 133
128 // Time we were started. 134 // Time we were started.
129 Time start_time_; 135 Time start_time_;
130 136
131 base::FilePath last_selected_directory_; 137 base::FilePath last_selected_directory_;
132 138
133 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; 139 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
134 140
135 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
136
137 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl); 141 DISALLOW_COPY_AND_ASSIGN(OffTheRecordProfileImpl);
138 }; 142 };
139 143
140 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_ 144 #endif // CHROME_BROWSER_PROFILES_OFF_THE_RECORD_PROFILE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/host_zoom_map_browsertest.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698