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

Side by Side Diff: chrome/browser/ui/app_list/app_list_syncable_service.cc

Issue 156843004: Remove ExtensionService::extension_prefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: additional cleanup Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/app_list/app_list_syncable_service.h" 5 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 syncer::SyncData GetSyncDataFromSyncItem( 87 syncer::SyncData GetSyncDataFromSyncItem(
88 const AppListSyncableService::SyncItem* item) { 88 const AppListSyncableService::SyncItem* item) {
89 sync_pb::EntitySpecifics specifics; 89 sync_pb::EntitySpecifics specifics;
90 GetSyncSpecificsFromSyncItem(item, specifics.mutable_app_list()); 90 GetSyncSpecificsFromSyncItem(item, specifics.mutable_app_list());
91 return syncer::SyncData::CreateLocalData(item->item_id, 91 return syncer::SyncData::CreateLocalData(item->item_id,
92 item->item_id, 92 item->item_id,
93 specifics); 93 specifics);
94 } 94 }
95 95
96 bool AppIsDefault(ExtensionService* service, const std::string& id) { 96 bool AppIsDefault(ExtensionService* service, const std::string& id) {
97 return service && service->extension_prefs()->WasInstalledByDefault(id); 97 return service &&
98 extensions::ExtensionPrefs::Get(service->profile())->
99 WasInstalledByDefault(id);
98 } 100 }
99 101
100 void UninstallExtension(ExtensionService* service, const std::string& id) { 102 void UninstallExtension(ExtensionService* service, const std::string& id) {
101 if (service && service->GetInstalledExtension(id)) 103 if (service && service->GetInstalledExtension(id))
102 service->UninstallExtension(id, false, NULL); 104 service->UninstallExtension(id, false, NULL);
103 } 105 }
104 106
105 bool GetAppListItemType(AppListItem* item, 107 bool GetAppListItemType(AppListItem* item,
106 sync_pb::AppListSpecifics::AppListItemType* type) { 108 sync_pb::AppListSpecifics::AppListItemType* type) {
107 const char* item_type = item->GetItemType(); 109 const char* item_type = item->GetItemType();
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 } else { 722 } else {
721 res += " { " + item_name + " }"; 723 res += " { " + item_name + " }";
722 res += " [" + item_ordinal.ToDebugString() + "]"; 724 res += " [" + item_ordinal.ToDebugString() + "]";
723 if (!parent_id.empty()) 725 if (!parent_id.empty())
724 res += " <" + parent_id.substr(0, 8) + ">"; 726 res += " <" + parent_id.substr(0, 8) + ">";
725 } 727 }
726 return res; 728 return res;
727 } 729 }
728 730
729 } // namespace app_list 731 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698