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

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

Issue 9296041: Create Content API around HostZoomMap. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 119530)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -95,11 +95,11 @@
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/chrome_blob_storage_context.h"
#include "content/browser/file_system/browser_file_system_helper.h"
-#include "content/browser/host_zoom_map.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/speech/speech_input_manager.h"
#include "content/browser/ssl/ssl_host_state.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
#include "grit/locale_settings.h"
@@ -138,6 +138,7 @@
using base::TimeDelta;
using content::BrowserThread;
using content::DownloadManager;
+using content::HostZoomMap;
using content::UserMetricsAction;
namespace {
@@ -895,8 +896,8 @@
HostZoomMap* ProfileImpl::GetHostZoomMap() {
if (!host_zoom_map_) {
- host_zoom_map_ = new HostZoomMap();
- host_zoom_map_->set_default_zoom_level(
+ host_zoom_map_ = HostZoomMap::Create();
+ host_zoom_map_->SetDefaultZoomLevel(
GetPrefs()->GetDouble(prefs::kDefaultZoomLevel));
const DictionaryValue* host_zoom_dictionary =
@@ -1301,7 +1302,7 @@
} else if (*pref_name_in == prefs::kProfileName) {
UpdateProfileNameCache();
} else if (*pref_name_in == prefs::kDefaultZoomLevel) {
- GetHostZoomMap()->set_default_zoom_level(
+ GetHostZoomMap()->SetDefaultZoomLevel(
prefs->GetDouble(prefs::kDefaultZoomLevel));
}
break;
@@ -1318,7 +1319,7 @@
double level = host_zoom_map_->GetZoomLevel(host);
DictionaryPrefUpdate update(prefs_.get(), prefs::kPerHostZoomLevels);
DictionaryValue* host_zoom_dictionary = update.Get();
- if (level == host_zoom_map_->default_zoom_level()) {
+ if (level == host_zoom_map_->GetDefaultZoomLevel()) {
host_zoom_dictionary->RemoveWithoutPathExpansion(host, NULL);
} else {
host_zoom_dictionary->SetWithoutPathExpansion(
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698