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

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: Replaced header in testing_profile 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 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 2f540caa5e8191ed0db30fe0e70b07a57131821f..e45dda434fe609507670d6ad4bbf8e137c27d2de 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -42,6 +42,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/storage_partition_descriptor.h"
#include "chrome/browser/search_engines/template_url_fetcher_factory.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"
@@ -61,6 +62,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"
@@ -636,7 +638,8 @@ 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));
}
scoped_refptr<base::SequencedTaskRunner> TestingProfile::GetIOTaskRunner() {
@@ -769,6 +772,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();
}
« chrome/browser/ui/browser_commands.cc ('K') | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698