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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 396493004: Get rid of some uses of CreateDoubleValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: right number of args + fix lint error Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 1067
1068 void ProfileImpl::OnZoomLevelChanged( 1068 void ProfileImpl::OnZoomLevelChanged(
1069 const HostZoomMap::ZoomLevelChange& change) { 1069 const HostZoomMap::ZoomLevelChange& change) {
1070 1070
1071 if (change.mode != HostZoomMap::ZOOM_CHANGED_FOR_HOST) 1071 if (change.mode != HostZoomMap::ZOOM_CHANGED_FOR_HOST)
1072 return; 1072 return;
1073 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); 1073 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this);
1074 double level = change.zoom_level; 1074 double level = change.zoom_level;
1075 DictionaryPrefUpdate update(prefs_.get(), prefs::kPerHostZoomLevels); 1075 DictionaryPrefUpdate update(prefs_.get(), prefs::kPerHostZoomLevels);
1076 base::DictionaryValue* host_zoom_dictionary = update.Get(); 1076 base::DictionaryValue* host_zoom_dictionary = update.Get();
1077 if (content::ZoomValuesEqual(level, host_zoom_map->GetDefaultZoomLevel())) { 1077 if (content::ZoomValuesEqual(level, host_zoom_map->GetDefaultZoomLevel()))
1078 host_zoom_dictionary->RemoveWithoutPathExpansion(change.host, NULL); 1078 host_zoom_dictionary->RemoveWithoutPathExpansion(change.host, NULL);
1079 } else { 1079 else
1080 host_zoom_dictionary->SetWithoutPathExpansion( 1080 host_zoom_dictionary->SetDoubleWithoutPathExpansion(change.host, level);
1081 change.host, base::Value::CreateDoubleValue(level));
1082 }
1083 } 1081 }
1084 1082
1085 #if defined(ENABLE_SESSION_SERVICE) 1083 #if defined(ENABLE_SESSION_SERVICE)
1086 void ProfileImpl::StopCreateSessionServiceTimer() { 1084 void ProfileImpl::StopCreateSessionServiceTimer() {
1087 create_session_service_timer_.Stop(); 1085 create_session_service_timer_.Stop();
1088 } 1086 }
1089 1087
1090 void ProfileImpl::EnsureSessionServiceCreated() { 1088 void ProfileImpl::EnsureSessionServiceCreated() {
1091 SessionServiceFactory::GetForProfile(this); 1089 SessionServiceFactory::GetForProfile(this);
1092 } 1090 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 ProfileImpl::CreateDomainReliabilityMonitor() { 1319 ProfileImpl::CreateDomainReliabilityMonitor() {
1322 domain_reliability::DomainReliabilityService* service = 1320 domain_reliability::DomainReliabilityService* service =
1323 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1321 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1324 GetForBrowserContext(this); 1322 GetForBrowserContext(this);
1325 if (!service) 1323 if (!service)
1326 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); 1324 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>();
1327 1325
1328 return service->CreateMonitor( 1326 return service->CreateMonitor(
1329 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 1327 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
1330 } 1328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698