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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( | 415 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
416 PluginPrefs::GetForProfile(this), | 416 PluginPrefs::GetForProfile(this), |
417 io_data_.GetResourceContextNoInit()); | 417 io_data_.GetResourceContextNoInit()); |
418 | 418 |
419 // Delay README creation to not impact startup performance. | 419 // Delay README creation to not impact startup performance. |
420 BrowserThread::PostDelayedTask( | 420 BrowserThread::PostDelayedTask( |
421 BrowserThread::FILE, FROM_HERE, | 421 BrowserThread::FILE, FROM_HERE, |
422 base::Bind(&EnsureReadmeFile, GetPath()), | 422 base::Bind(&EnsureReadmeFile, GetPath()), |
423 base::TimeDelta::FromMilliseconds(create_readme_delay_ms)); | 423 base::TimeDelta::FromMilliseconds(create_readme_delay_ms)); |
424 | 424 |
425 if (CommandLine::ForCurrentProcess()->HasSwitch( | 425 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
426 switches::kEnableRestoreSessionState)) { | 426 switches::kDisableRestoreSessionState)) { |
427 content::BrowserContext::GetDefaultDOMStorageContext(this)-> | 427 content::BrowserContext::GetDefaultDOMStorageContext(this)-> |
428 SetSaveSessionStorageOnDisk(); | 428 SetSaveSessionStorageOnDisk(); |
429 } | 429 } |
430 | 430 |
431 // Creation has been finished. | 431 // Creation has been finished. |
432 if (delegate_) | 432 if (delegate_) |
433 delegate_->OnProfileCreated(this, true, is_new_profile); | 433 delegate_->OnProfileCreated(this, true, is_new_profile); |
434 | 434 |
435 content::NotificationService::current()->Notify( | 435 content::NotificationService::current()->Notify( |
436 chrome::NOTIFICATION_PROFILE_CREATED, | 436 chrome::NOTIFICATION_PROFILE_CREATED, |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 if (!path.empty()) | 1075 if (!path.empty()) |
1076 *cache_path = path; | 1076 *cache_path = path; |
1077 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1077 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1078 prefs_->GetInteger(prefs::kDiskCacheSize); | 1078 prefs_->GetInteger(prefs::kDiskCacheSize); |
1079 } | 1079 } |
1080 | 1080 |
1081 base::Callback<ChromeURLDataManagerBackend*(void)> | 1081 base::Callback<ChromeURLDataManagerBackend*(void)> |
1082 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1082 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
1083 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1083 return io_data_.GetChromeURLDataManagerBackendGetter(); |
1084 } | 1084 } |
OLD | NEW |