| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 spellcheck_host_metrics_.reset(new SpellCheckHostMetrics()); | 411 spellcheck_host_metrics_.reset(new SpellCheckHostMetrics()); |
| 412 spellcheck_host_metrics_->RecordEnabledStats( | 412 spellcheck_host_metrics_->RecordEnabledStats( |
| 413 GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); | 413 GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); |
| 414 } | 414 } |
| 415 | 415 |
| 416 speech_input::SpeechInputManager::Get()->set_censor_results( | 416 speech_input::SpeechInputManager::Get()->set_censor_results( |
| 417 prefs->GetBoolean(prefs::kSpeechInputCensorResults)); | 417 prefs->GetBoolean(prefs::kSpeechInputCensorResults)); |
| 418 | 418 |
| 419 FilePath cookie_path = GetPath(); | 419 FilePath cookie_path = GetPath(); |
| 420 cookie_path = cookie_path.Append(chrome::kCookieFilename); | 420 cookie_path = cookie_path.Append(chrome::kCookieFilename); |
| 421 FilePath origin_bound_cert_path = GetPath(); |
| 422 origin_bound_cert_path = origin_bound_cert_path.Append( |
| 423 chrome::kOBCertFilename); |
| 421 FilePath cache_path = base_cache_path_; | 424 FilePath cache_path = base_cache_path_; |
| 422 int cache_max_size; | 425 int cache_max_size; |
| 423 GetCacheParameters(kNormalContext, &cache_path, &cache_max_size); | 426 GetCacheParameters(kNormalContext, &cache_path, &cache_max_size); |
| 424 cache_path = GetCachePath(cache_path); | 427 cache_path = GetCachePath(cache_path); |
| 425 | 428 |
| 426 FilePath media_cache_path = base_cache_path_; | 429 FilePath media_cache_path = base_cache_path_; |
| 427 int media_cache_max_size; | 430 int media_cache_max_size; |
| 428 GetCacheParameters(kMediaContext, &media_cache_path, &media_cache_max_size); | 431 GetCacheParameters(kMediaContext, &media_cache_path, &media_cache_max_size); |
| 429 media_cache_path = GetMediaCachePath(media_cache_path); | 432 media_cache_path = GetMediaCachePath(media_cache_path); |
| 430 | 433 |
| 431 FilePath extensions_cookie_path = GetPath(); | 434 FilePath extensions_cookie_path = GetPath(); |
| 432 extensions_cookie_path = | 435 extensions_cookie_path = extensions_cookie_path.Append( |
| 433 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename); | 436 chrome::kExtensionsCookieFilename); |
| 437 FilePath extensions_origin_bound_cert_path = GetPath(); |
| 438 extensions_origin_bound_cert_path = extensions_origin_bound_cert_path.Append( |
| 439 chrome::kExtensionsOBCertFilename); |
| 434 | 440 |
| 435 FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname); | 441 FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname); |
| 436 | 442 |
| 437 // Make sure we initialize the ProfileIOData after everything else has been | 443 // Make sure we initialize the ProfileIOData after everything else has been |
| 438 // initialized that we might be reading from the IO thread. | 444 // initialized that we might be reading from the IO thread. |
| 439 io_data_.Init(cookie_path, cache_path, cache_max_size, | 445 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path, |
| 440 media_cache_path, media_cache_max_size, extensions_cookie_path, | 446 cache_max_size, media_cache_path, media_cache_max_size, |
| 447 extensions_cookie_path, extensions_origin_bound_cert_path, |
| 441 app_path); | 448 app_path); |
| 442 | 449 |
| 443 // Creation has been finished. | 450 // Creation has been finished. |
| 444 if (delegate_) | 451 if (delegate_) |
| 445 delegate_->OnProfileCreated(this, true); | 452 delegate_->OnProfileCreated(this, true); |
| 446 | 453 |
| 447 NotificationService::current()->Notify( | 454 NotificationService::current()->Notify( |
| 448 chrome::NOTIFICATION_PROFILE_CREATED, | 455 chrome::NOTIFICATION_PROFILE_CREATED, |
| 449 Source<Profile>(this), | 456 Source<Profile>(this), |
| 450 NotificationService::NoDetails()); | 457 NotificationService::NoDetails()); |
| (...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1764 new prerender::PrerenderManager( | 1771 new prerender::PrerenderManager( |
| 1765 this, g_browser_process->prerender_tracker())); | 1772 this, g_browser_process->prerender_tracker())); |
| 1766 #if defined(OS_CHROMEOS) | 1773 #if defined(OS_CHROMEOS) |
| 1767 prerender_manager_->AddCondition( | 1774 prerender_manager_->AddCondition( |
| 1768 new chromeos::PrerenderConditionNetwork( | 1775 new chromeos::PrerenderConditionNetwork( |
| 1769 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); | 1776 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); |
| 1770 #endif | 1777 #endif |
| 1771 } | 1778 } |
| 1772 return prerender_manager_.get(); | 1779 return prerender_manager_.get(); |
| 1773 } | 1780 } |
| OLD | NEW |