| 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/prefs/chrome_command_line_pref_store.h> | 5 #include <chrome/browser/prefs/chrome_command_line_pref_store.h> |
| 6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 int message_id = 0; | 369 int message_id = 0; |
| 370 if (error <= PersistentPrefStore::PREF_READ_ERROR_JSON_TYPE) { | 370 if (error <= PersistentPrefStore::PREF_READ_ERROR_JSON_TYPE) { |
| 371 message_id = IDS_PREFERENCES_CORRUPT_ERROR; | 371 message_id = IDS_PREFERENCES_CORRUPT_ERROR; |
| 372 } else if (error != PersistentPrefStore::PREF_READ_ERROR_NO_FILE) { | 372 } else if (error != PersistentPrefStore::PREF_READ_ERROR_NO_FILE) { |
| 373 message_id = IDS_PREFERENCES_UNREADABLE_ERROR; | 373 message_id = IDS_PREFERENCES_UNREADABLE_ERROR; |
| 374 } | 374 } |
| 375 | 375 |
| 376 if (message_id) { | 376 if (message_id) { |
| 377 BrowserThread::PostTask( | 377 BrowserThread::PostTask( |
| 378 BrowserThread::UI, FROM_HERE, | 378 BrowserThread::UI, FROM_HERE, |
| 379 base::Bind(&ShowProfileErrorDialog, PROFILE_ERROR_PREFERENCES, | 379 base::Bind(&ShowProfileErrorDialog, ProfileErrorType::PREFERENCES, |
| 380 message_id, | 380 message_id, |
| 381 sql::GetCorruptFileDiagnosticsInfo(pref_filename))); | 381 sql::GetCorruptFileDiagnosticsInfo(pref_filename))); |
| 382 } | 382 } |
| 383 #else | 383 #else |
| 384 // On ChromeOS error screen with message about broken local state | 384 // On ChromeOS error screen with message about broken local state |
| 385 // will be displayed. | 385 // will be displayed. |
| 386 | 386 |
| 387 // A supplementary error message about broken local state - is included | 387 // A supplementary error message about broken local state - is included |
| 388 // in logs and user feedbacks. | 388 // in logs and user feedbacks. |
| 389 if (error != PersistentPrefStore::PREF_READ_ERROR_NONE && | 389 if (error != PersistentPrefStore::PREF_READ_ERROR_NONE && |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 | 539 |
| 540 void ClearResetTime(Profile* profile) { | 540 void ClearResetTime(Profile* profile) { |
| 541 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); | 541 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); |
| 542 } | 542 } |
| 543 | 543 |
| 544 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 544 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 545 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 545 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
| 546 } | 546 } |
| 547 | 547 |
| 548 } // namespace chrome_prefs | 548 } // namespace chrome_prefs |
| OLD | NEW |