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

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

Issue 2874833002: Don't compile code for desktop zoom or GuestViews on mobile platforms. (Closed)
Patch Set: Rebase. Created 3 years, 7 months 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
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 // This class gathers state related to a single user profile. 5 // This class gathers state related to a single user profile.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "components/domain_reliability/clear_mode.h" 16 #include "components/domain_reliability/clear_mode.h"
17 #include "content/public/browser/browser_context.h" 17 #include "content/public/browser/browser_context.h"
18 #include "content/public/browser/content_browser_client.h" 18 #include "content/public/browser/content_browser_client.h"
19 19
20 #if !defined(OS_ANDROID)
20 class ChromeZoomLevelPrefs; 21 class ChromeZoomLevelPrefs;
22 #endif
23
21 class DevToolsNetworkControllerHandle; 24 class DevToolsNetworkControllerHandle;
22 class ExtensionSpecialStoragePolicy; 25 class ExtensionSpecialStoragePolicy;
23 class PrefProxyConfigTracker; 26 class PrefProxyConfigTracker;
24 class PrefService; 27 class PrefService;
25 class TestingProfile; 28 class TestingProfile;
26 29
27 namespace base { 30 namespace base {
28 class SequencedTaskRunner; 31 class SequencedTaskRunner;
29 class Time; 32 class Time;
30 } 33 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 172
170 // Accessor. The instance is created upon first access. 173 // Accessor. The instance is created upon first access.
171 virtual ExtensionSpecialStoragePolicy* 174 virtual ExtensionSpecialStoragePolicy*
172 GetExtensionSpecialStoragePolicy() = 0; 175 GetExtensionSpecialStoragePolicy() = 0;
173 176
174 // Retrieves a pointer to the PrefService that manages the 177 // Retrieves a pointer to the PrefService that manages the
175 // preferences for this user profile. 178 // preferences for this user profile.
176 virtual PrefService* GetPrefs() = 0; 179 virtual PrefService* GetPrefs() = 0;
177 virtual const PrefService* GetPrefs() const = 0; 180 virtual const PrefService* GetPrefs() const = 0;
178 181
182 #if !defined(OS_ANDROID)
179 // Retrieves a pointer to the PrefService that manages the default zoom 183 // Retrieves a pointer to the PrefService that manages the default zoom
180 // level and the per-host zoom levels for this user profile. 184 // level and the per-host zoom levels for this user profile.
181 // TODO(wjmaclean): Remove this when HostZoomMap migrates to StoragePartition. 185 // TODO(wjmaclean): Remove this when HostZoomMap migrates to StoragePartition.
182 virtual ChromeZoomLevelPrefs* GetZoomLevelPrefs(); 186 virtual ChromeZoomLevelPrefs* GetZoomLevelPrefs();
187 #endif
183 188
184 // Retrieves a pointer to the PrefService that manages the preferences 189 // Retrieves a pointer to the PrefService that manages the preferences
185 // for OffTheRecord Profiles. This PrefService is lazily created the first 190 // for OffTheRecord Profiles. This PrefService is lazily created the first
186 // time that this method is called. 191 // time that this method is called.
187 virtual PrefService* GetOffTheRecordPrefs() = 0; 192 virtual PrefService* GetOffTheRecordPrefs() = 0;
188 193
189 // Returns the main request context. 194 // Returns the main request context.
190 virtual net::URLRequestContextGetter* GetRequestContext() = 0; 195 virtual net::URLRequestContextGetter* GetRequestContext() = 0;
191 196
192 // Returns the request context used for extension-related requests. This 197 // Returns the request context used for extension-related requests. This
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 bool IsSyncAllowed(); 323 bool IsSyncAllowed();
319 324
320 // Send NOTIFICATION_PROFILE_DESTROYED for this Profile, if it has not 325 // Send NOTIFICATION_PROFILE_DESTROYED for this Profile, if it has not
321 // already been sent. It is necessary because most Profiles are destroyed by 326 // already been sent. It is necessary because most Profiles are destroyed by
322 // ProfileDestroyer, but in tests, some are not. 327 // ProfileDestroyer, but in tests, some are not.
323 void MaybeSendDestroyedNotification(); 328 void MaybeSendDestroyedNotification();
324 329
325 // Creates an OffTheRecordProfile which points to this Profile. 330 // Creates an OffTheRecordProfile which points to this Profile.
326 Profile* CreateOffTheRecordProfile(); 331 Profile* CreateOffTheRecordProfile();
327 332
333 #if !defined(OS_ANDROID)
328 // Convenience method to retrieve the default zoom level for the default 334 // Convenience method to retrieve the default zoom level for the default
329 // storage partition. 335 // storage partition.
330 double GetDefaultZoomLevelForProfile(); 336 double GetDefaultZoomLevelForProfile();
337 #endif
331 338
332 protected: 339 protected:
333 void set_is_guest_profile(bool is_guest_profile) { 340 void set_is_guest_profile(bool is_guest_profile) {
334 is_guest_profile_ = is_guest_profile; 341 is_guest_profile_ = is_guest_profile;
335 } 342 }
336 343
337 void set_is_system_profile(bool is_system_profile) { 344 void set_is_system_profile(bool is_system_profile) {
338 is_system_profile_ = is_system_profile; 345 is_system_profile_ = is_system_profile;
339 } 346 }
340 347
(...skipping 17 matching lines...) Expand all
358 365
359 DISALLOW_COPY_AND_ASSIGN(Profile); 366 DISALLOW_COPY_AND_ASSIGN(Profile);
360 }; 367 };
361 368
362 // The comparator for profile pointers as key in a map. 369 // The comparator for profile pointers as key in a map.
363 struct ProfileCompare { 370 struct ProfileCompare {
364 bool operator()(Profile* a, Profile* b) const; 371 bool operator()(Profile* a, Profile* b) const;
365 }; 372 };
366 373
367 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 374 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698