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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 2874833002: Don't compile code for desktop zoom or GuestViews on mobile platforms. (Closed)
Patch Set: Update CastBrowserContext 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index a3bcd2e1527a70942a00605cf7cfd6a5af998c0f..f668fe617c8821a603498eb8cc36a1e7e538aed1 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -108,7 +108,6 @@
#include "components/sync_preferences/pref_service_syncable.h"
#include "components/url_formatter/url_fixer.h"
#include "components/user_prefs/user_prefs.h"
-#include "components/zoom/zoom_event_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/dom_storage_context.h"
#include "content/public/browser/notification_service.h"
@@ -116,7 +115,6 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/common/content_constants.h"
-#include "content/public/common/page_zoom.h"
#include "extensions/features/features.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "ppapi/features/features.h"
@@ -137,6 +135,11 @@
#include "components/user_manager/user_manager.h"
#endif
+#if !defined(OS_ANDROID)
+#include "components/zoom/zoom_event_manager.h"
+#include "content/public/common/page_zoom.h"
+#endif
+
#if BUILDFLAG(ENABLE_BACKGROUND)
#include "chrome/browser/background/background_mode_manager.h"
#endif
@@ -771,12 +774,14 @@ Profile::ProfileType ProfileImpl::GetProfileType() const {
return REGULAR_PROFILE;
}
+#if !defined(OS_ANDROID)
std::unique_ptr<content::ZoomLevelDelegate>
ProfileImpl::CreateZoomLevelDelegate(const base::FilePath& partition_path) {
return base::MakeUnique<ChromeZoomLevelPrefs>(
GetPrefs(), GetPath(), partition_path,
zoom::ZoomEventManager::GetForBrowserContext(this)->GetWeakPtr());
}
+#endif // !defined(OS_ANDROID)
base::FilePath ProfileImpl::GetPath() const {
return path_;
@@ -962,10 +967,12 @@ const PrefService* ProfileImpl::GetPrefs() const {
return prefs_.get();
}
+#if !defined(OS_ANDROID)
ChromeZoomLevelPrefs* ProfileImpl::GetZoomLevelPrefs() {
return static_cast<ChromeZoomLevelPrefs*>(
GetDefaultStoragePartition(this)->GetZoomLevelDelegate());
}
+#endif // !defined(OS_ANDROID)
PrefService* ProfileImpl::GetOffTheRecordPrefs() {
DCHECK(prefs_);

Powered by Google App Engine
This is Rietveld 408576698