| OLD | NEW |
| 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 Loading... |
| 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(ENABLE_PROMO_RESOURCE_SERVICE) |
| 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 Loading... |
| 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 } |
| OLD | NEW |