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

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

Issue 9949033: Removed access to prefs that does not work on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a flag enable_promo_resource_service Created 8 years, 8 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 DCHECK(success); 422 DCHECK(success);
423 host_zoom_map->SetZoomLevel(host, zoom_level); 423 host_zoom_map->SetZoomLevel(host, zoom_level);
424 } 424 }
425 } 425 }
426 426
427 registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, 427 registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
428 content::Source<HostZoomMap>(host_zoom_map)); 428 content::Source<HostZoomMap>(host_zoom_map));
429 } 429 }
430 430
431 void ProfileImpl::InitPromoResources() { 431 void ProfileImpl::InitPromoResources() {
432 #if !defined(OS_ANDROID)
Yaron 2012/04/09 18:31:54 Change if-def to ENABLE_*.
Jerome 2012/04/09 20:10:52 Done.
432 if (promo_resource_service_) 433 if (promo_resource_service_)
433 return; 434 return;
434 435
435 promo_resource_service_ = new PromoResourceService(this); 436 promo_resource_service_ = new PromoResourceService(this);
436 promo_resource_service_->StartAfterDelay(); 437 promo_resource_service_->StartAfterDelay();
438 #endif
437 } 439 }
438 440
439 void ProfileImpl::InitRegisteredProtocolHandlers() { 441 void ProfileImpl::InitRegisteredProtocolHandlers() {
440 if (protocol_handler_registry_) 442 if (protocol_handler_registry_)
441 return; 443 return;
442 protocol_handler_registry_ = new ProtocolHandlerRegistry(this, 444 protocol_handler_registry_ = new ProtocolHandlerRegistry(this,
443 new ProtocolHandlerRegistry::Delegate()); 445 new ProtocolHandlerRegistry::Delegate());
444 protocol_handler_registry_->Load(); 446 protocol_handler_registry_->Load();
445 } 447 }
446 448
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 FilePath* cache_path, 1156 FilePath* cache_path,
1155 int* max_size) { 1157 int* max_size) {
1156 DCHECK(cache_path); 1158 DCHECK(cache_path);
1157 DCHECK(max_size); 1159 DCHECK(max_size);
1158 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); 1160 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir));
1159 if (!path.empty()) 1161 if (!path.empty())
1160 *cache_path = path; 1162 *cache_path = path;
1161 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1163 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1162 prefs_->GetInteger(prefs::kDiskCacheSize); 1164 prefs_->GetInteger(prefs::kDiskCacheSize);
1163 } 1165 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698