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

Side by Side Diff: chrome/browser/media_galleries/media_galleries_preferences.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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 | Annotate | Revision Log
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/media_galleries/media_galleries_preferences.h" 5 #include "chrome/browser/media_galleries/media_galleries_preferences.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 // static 656 // static
657 bool MediaGalleriesPreferences::APIHasBeenUsed(Profile* profile) { 657 bool MediaGalleriesPreferences::APIHasBeenUsed(Profile* profile) {
658 MediaGalleryPrefId current_id = 658 MediaGalleryPrefId current_id =
659 profile->GetPrefs()->GetUint64(prefs::kMediaGalleriesUniqueId); 659 profile->GetPrefs()->GetUint64(prefs::kMediaGalleriesUniqueId);
660 return current_id != kInvalidMediaGalleryPrefId + 1; 660 return current_id != kInvalidMediaGalleryPrefId + 1;
661 } 661 }
662 662
663 // static 663 // static
664 void MediaGalleriesPreferences::RegisterUserPrefs( 664 void MediaGalleriesPreferences::RegisterUserPrefs(
665 PrefRegistrySyncable* registry) { 665 user_prefs::PrefRegistrySyncable* registry) {
666 registry->RegisterListPref(prefs::kMediaGalleriesRememberedGalleries, 666 registry->RegisterListPref(prefs::kMediaGalleriesRememberedGalleries,
667 PrefRegistrySyncable::UNSYNCABLE_PREF); 667 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
668 registry->RegisterUint64Pref(prefs::kMediaGalleriesUniqueId, 668 registry->RegisterUint64Pref(
669 kInvalidMediaGalleryPrefId + 1, 669 prefs::kMediaGalleriesUniqueId,
670 PrefRegistrySyncable::UNSYNCABLE_PREF); 670 kInvalidMediaGalleryPrefId + 1,
671 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
671 } 672 }
672 673
673 extensions::ExtensionPrefs* 674 extensions::ExtensionPrefs*
674 MediaGalleriesPreferences::GetExtensionPrefs() const { 675 MediaGalleriesPreferences::GetExtensionPrefs() const {
675 ExtensionService* extension_service = 676 ExtensionService* extension_service =
676 extensions::ExtensionSystem::Get(profile_)->extension_service(); 677 extensions::ExtensionSystem::Get(profile_)->extension_service();
677 return extension_service->extension_prefs(); 678 return extension_service->extension_prefs();
678 } 679 }
679 680
680 } // namespace chrome 681 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698