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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
464 | 464 |
465 PrefService* local_state = g_browser_process->local_state(); | 465 PrefService* local_state = g_browser_process->local_state(); |
466 ssl_config_service_manager_.reset( | 466 ssl_config_service_manager_.reset( |
467 SSLConfigServiceManager::CreateDefaultManager(local_state, prefs)); | 467 SSLConfigServiceManager::CreateDefaultManager(local_state, prefs)); |
468 | 468 |
469 // Initialize the BackgroundModeManager - this has to be done here before | 469 // Initialize the BackgroundModeManager - this has to be done here before |
470 // InitExtensions() is called because it relies on receiving notifications | 470 // InitExtensions() is called because it relies on receiving notifications |
471 // when extensions are loaded. BackgroundModeManager is not needed under | 471 // when extensions are loaded. BackgroundModeManager is not needed under |
472 // ChromeOS because Chrome is always running, no need for special keep-alive | 472 // ChromeOS because Chrome is always running, no need for special keep-alive |
473 // or launch-on-startup support unless kKeepAliveForTest is set. | 473 // or launch-on-startup support unless kKeepAliveForTest is set. |
474 bool init_background_mode_manager = true; | 474 bool init_background_mode_manager = |
475 !ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess()); | |
gab
2013/03/07 19:54:22
While you're probably right this doesn't need to b
| |
475 #if defined(OS_CHROMEOS) | 476 #if defined(OS_CHROMEOS) |
476 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepAliveForTest)) | 477 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepAliveForTest)) |
477 init_background_mode_manager = false; | 478 init_background_mode_manager = false; |
478 #endif | 479 #endif |
479 if (init_background_mode_manager) { | 480 if (init_background_mode_manager) { |
480 if (g_browser_process->background_mode_manager()) | 481 if (g_browser_process->background_mode_manager()) |
481 g_browser_process->background_mode_manager()->RegisterProfile(this); | 482 g_browser_process->background_mode_manager()->RegisterProfile(this); |
482 } | 483 } |
483 | 484 |
484 base::FilePath cookie_path = GetPath(); | 485 base::FilePath cookie_path = GetPath(); |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1162 base::FilePath* cache_path, | 1163 base::FilePath* cache_path, |
1163 int* max_size) { | 1164 int* max_size) { |
1164 DCHECK(cache_path); | 1165 DCHECK(cache_path); |
1165 DCHECK(max_size); | 1166 DCHECK(max_size); |
1166 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1167 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
1167 if (!path.empty()) | 1168 if (!path.empty()) |
1168 *cache_path = path; | 1169 *cache_path = path; |
1169 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1170 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1170 prefs_->GetInteger(prefs::kDiskCacheSize); | 1171 prefs_->GetInteger(prefs::kDiskCacheSize); |
1171 } | 1172 } |
OLD | NEW |