| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 DCHECK(success); | 416 DCHECK(success); |
| 417 host_zoom_map->SetZoomLevel(host, zoom_level); | 417 host_zoom_map->SetZoomLevel(host, zoom_level); |
| 418 } | 418 } |
| 419 } | 419 } |
| 420 | 420 |
| 421 registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, | 421 registrar_.Add(this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED, |
| 422 content::Source<HostZoomMap>(host_zoom_map)); | 422 content::Source<HostZoomMap>(host_zoom_map)); |
| 423 } | 423 } |
| 424 | 424 |
| 425 void ProfileImpl::InitPromoResources() { | 425 void ProfileImpl::InitPromoResources() { |
| 426 #if !defined(OS_ANDROID) |
| 426 if (promo_resource_service_) | 427 if (promo_resource_service_) |
| 427 return; | 428 return; |
| 428 | 429 |
| 429 promo_resource_service_ = new PromoResourceService(this); | 430 promo_resource_service_ = new PromoResourceService(this); |
| 430 promo_resource_service_->StartAfterDelay(); | 431 promo_resource_service_->StartAfterDelay(); |
| 432 #endif |
| 431 } | 433 } |
| 432 | 434 |
| 433 void ProfileImpl::InitRegisteredProtocolHandlers() { | 435 void ProfileImpl::InitRegisteredProtocolHandlers() { |
| 434 if (protocol_handler_registry_) | 436 if (protocol_handler_registry_) |
| 435 return; | 437 return; |
| 436 protocol_handler_registry_ = new ProtocolHandlerRegistry(this, | 438 protocol_handler_registry_ = new ProtocolHandlerRegistry(this, |
| 437 new ProtocolHandlerRegistry::Delegate()); | 439 new ProtocolHandlerRegistry::Delegate()); |
| 438 protocol_handler_registry_->Load(); | 440 protocol_handler_registry_->Load(); |
| 439 } | 441 } |
| 440 | 442 |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 FilePath* cache_path, | 1158 FilePath* cache_path, |
| 1157 int* max_size) { | 1159 int* max_size) { |
| 1158 DCHECK(cache_path); | 1160 DCHECK(cache_path); |
| 1159 DCHECK(max_size); | 1161 DCHECK(max_size); |
| 1160 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1162 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
| 1161 if (!path.empty()) | 1163 if (!path.empty()) |
| 1162 *cache_path = path; | 1164 *cache_path = path; |
| 1163 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1165 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1164 prefs_->GetInteger(prefs::kDiskCacheSize); | 1166 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1165 } | 1167 } |
| OLD | NEW |