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

Unified Diff: chrome/test/base/testing_profile.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/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index c43d29fdee2dbfb04d59119c832b39124fcdedb7..e67830959f240692ba785ea4a810e8baa8b06116 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -46,7 +46,6 @@
#include "chrome/browser/search_engines/template_url_fetcher_factory.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sync/glue/sync_start_util.h"
-#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
#include "chrome/browser/web_data_service_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
@@ -84,13 +83,11 @@
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "components/user_prefs/user_prefs.h"
#include "components/webdata_services/web_data_service_wrapper.h"
-#include "components/zoom/zoom_event_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/cookie_store_factory.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
-#include "content/public/browser/zoom_level_delegate.h"
#include "content/public/test/mock_resource_context.h"
#include "content/public/test/test_utils.h"
#include "extensions/common/constants.h"
@@ -118,7 +115,11 @@
#if defined(OS_ANDROID)
#include "chrome/browser/signin/oauth2_token_service_delegate_android.h"
-#endif
+#else // defined(OS_ANDROID)
+#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
+#include "components/zoom/zoom_event_manager.h"
+#include "content/public/browser/zoom_level_delegate.h"
+#endif // defined(OS_ANDROID)
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
#include "chrome/browser/supervised_user/supervised_user_constants.h"
@@ -674,12 +675,14 @@ base::FilePath TestingProfile::GetPath() const {
return profile_path_;
}
+#if !defined(OS_ANDROID)
std::unique_ptr<content::ZoomLevelDelegate>
TestingProfile::CreateZoomLevelDelegate(const base::FilePath& partition_path) {
return base::MakeUnique<ChromeZoomLevelPrefs>(
GetPrefs(), GetPath(), partition_path,
zoom::ZoomEventManager::GetForBrowserContext(this)->GetWeakPtr());
}
+#endif // !defined(OS_ANDROID)
scoped_refptr<base::SequencedTaskRunner> TestingProfile::GetIOTaskRunner() {
return base::ThreadTaskRunnerHandle::Get();
@@ -851,10 +854,12 @@ const PrefService* TestingProfile::GetPrefs() const {
return prefs_.get();
}
+#if !defined(OS_ANDROID)
ChromeZoomLevelPrefs* TestingProfile::GetZoomLevelPrefs() {
return static_cast<ChromeZoomLevelPrefs*>(
GetDefaultStoragePartition(this)->GetZoomLevelDelegate());
}
+#endif // !defined(OS_ANDROID)
DownloadManagerDelegate* TestingProfile::GetDownloadManagerDelegate() {
return NULL;

Powered by Google App Engine
This is Rietveld 408576698