Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chrome/browser/prefs/chrome_pref_service_factory.cc

Issue 2438433006: chrome: change ProfileErrorType enum into an enum class (Closed)
Patch Set: update comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/history/chrome_history_client.cc ('k') | chrome/browser/ui/profile_error_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698