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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 return; | 687 return; |
688 } | 688 } |
689 | 689 |
690 // The Profile class and ProfileManager class may read some prefs so | 690 // The Profile class and ProfileManager class may read some prefs so |
691 // register known prefs as soon as possible. | 691 // register known prefs as soon as possible. |
692 Profile::RegisterUserPrefs(prefs_.get()); | 692 Profile::RegisterUserPrefs(prefs_.get()); |
693 chrome::RegisterUserPrefs(prefs_.get()); | 693 chrome::RegisterUserPrefs(prefs_.get()); |
694 // TODO(mirandac): remove migration code after 6 months (crbug.com/69995). | 694 // TODO(mirandac): remove migration code after 6 months (crbug.com/69995). |
695 if (g_browser_process->local_state()) | 695 if (g_browser_process->local_state()) |
696 chrome::MigrateBrowserPrefs(this, g_browser_process->local_state()); | 696 chrome::MigrateBrowserPrefs(this, g_browser_process->local_state()); |
| 697 // TODO(ivankr): remove cleanup code eventually (crbug.com/165672). |
| 698 chrome::MigrateUserPrefs(this); |
697 | 699 |
698 // |kSessionExitType| was added after |kSessionExitedCleanly|. If the pref | 700 // |kSessionExitType| was added after |kSessionExitedCleanly|. If the pref |
699 // value is empty fallback to checking for |kSessionExitedCleanly|. | 701 // value is empty fallback to checking for |kSessionExitedCleanly|. |
700 const std::string exit_type_pref_value( | 702 const std::string exit_type_pref_value( |
701 prefs_->GetString(prefs::kSessionExitType)); | 703 prefs_->GetString(prefs::kSessionExitType)); |
702 if (exit_type_pref_value.empty()) { | 704 if (exit_type_pref_value.empty()) { |
703 last_session_exit_type_ = | 705 last_session_exit_type_ = |
704 prefs_->GetBoolean(prefs::kSessionExitedCleanly) ? | 706 prefs_->GetBoolean(prefs::kSessionExitedCleanly) ? |
705 EXIT_NORMAL : EXIT_CRASHED; | 707 EXIT_NORMAL : EXIT_CRASHED; |
706 } else { | 708 } else { |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 if (!path.empty()) | 1153 if (!path.empty()) |
1152 *cache_path = path; | 1154 *cache_path = path; |
1153 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1155 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1154 prefs_->GetInteger(prefs::kDiskCacheSize); | 1156 prefs_->GetInteger(prefs::kDiskCacheSize); |
1155 } | 1157 } |
1156 | 1158 |
1157 base::Callback<ChromeURLDataManagerBackend*(void)> | 1159 base::Callback<ChromeURLDataManagerBackend*(void)> |
1158 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1160 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
1159 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1161 return io_data_.GetChromeURLDataManagerBackendGetter(); |
1160 } | 1162 } |
OLD | NEW |