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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 678343002: Default zoom was never read from chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comments based on feedback Created 5 years, 11 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 4da232cc66e230c29dfc3770964c5e743220cb2c..2d683b34f80b30fe9e67f72d92f560899bb04cae 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -42,6 +42,7 @@
#include "chrome/browser/profiles/storage_partition_descriptor.h"
#include "chrome/browser/search_engines/template_url_fetcher_factory.h"
#include "chrome/browser/sync/glue/sync_start_util.h"
+#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
@@ -58,6 +59,7 @@
#include "components/history/core/browser/top_sites_observer.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/policy/core/common/policy_service.h"
+#include "components/ui/zoom/zoom_event_manager.h"
#include "components/user_prefs/user_prefs.h"
#include "components/webdata_services/web_data_service_wrapper.h"
#include "content/public/browser/browser_thread.h"
@@ -65,6 +67,7 @@
#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"
@@ -649,7 +652,9 @@ base::FilePath TestingProfile::GetPath() const {
scoped_ptr<content::ZoomLevelDelegate> TestingProfile::CreateZoomLevelDelegate(
const base::FilePath& partition_path) {
- return nullptr;
+ return make_scoped_ptr(new chrome::ChromeZoomLevelPrefs(
+ GetPrefs(), GetPath(), partition_path,
+ ui_zoom::ZoomEventManager::GetForBrowserContext(this)->GetWeakPtr()));
}
scoped_refptr<base::SequencedTaskRunner> TestingProfile::GetIOTaskRunner() {
@@ -794,6 +799,11 @@ PrefService* TestingProfile::GetPrefs() {
return prefs_.get();
}
+chrome::ChromeZoomLevelPrefs* TestingProfile::GetZoomLevelPrefs() {
+ return static_cast<chrome::ChromeZoomLevelPrefs*>(
+ GetDefaultStoragePartition(this)->GetZoomLevelDelegate());
+}
+
history::TopSites* TestingProfile::GetTopSites() {
return top_sites_.get();
}

Powered by Google App Engine
This is Rietveld 408576698