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

Side by Side Diff: chrome/browser/extensions/app_sync_bundle.cc

Issue 17038002: Separate the NTP app ordering from the app list app ordering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert lazy initialzation Created 7 years, 3 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/extensions/app_sync_bundle.h" 5 #include "chrome/browser/extensions/app_sync_bundle.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_sorting.h" 9 #include "chrome/browser/extensions/extension_sorting.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 else 97 else
98 AddApp(app_sync_data.id()); 98 AddApp(app_sync_data.id());
99 extension_service_->ProcessAppSyncData(app_sync_data); 99 extension_service_->ProcessAppSyncData(app_sync_data);
100 } 100 }
101 101
102 void AppSyncBundle::ProcessSyncChangeList( 102 void AppSyncBundle::ProcessSyncChangeList(
103 syncer::SyncChangeList sync_change_list) { 103 syncer::SyncChangeList sync_change_list) {
104 sync_processor_->ProcessSyncChanges(FROM_HERE, sync_change_list); 104 sync_processor_->ProcessSyncChanges(FROM_HERE, sync_change_list);
105 extension_service_->extension_prefs()->extension_sorting()-> 105 extension_service_->extension_prefs()->extension_sorting()->
106 FixNTPOrdinalCollisions(); 106 FixNTPOrdinalCollisions();
107 extension_service_->extension_prefs()->app_list_extension_sorting()->
108 FixSyncCollisions();
107 } 109 }
108 110
109 bool AppSyncBundle::HasExtensionId(const std::string& id) const { 111 bool AppSyncBundle::HasExtensionId(const std::string& id) const {
110 return synced_apps_.find(id) != synced_apps_.end(); 112 return synced_apps_.find(id) != synced_apps_.end();
111 } 113 }
112 114
113 bool AppSyncBundle::HasPendingExtensionId(const std::string& id) const { 115 bool AppSyncBundle::HasPendingExtensionId(const std::string& id) const {
114 return pending_sync_data_.find(id) != pending_sync_data_.end(); 116 return pending_sync_data_.find(id) != pending_sync_data_.end();
115 } 117 }
116 118
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 162 }
161 163
162 164
163 void AppSyncBundle::MarkPendingAppSynced(const std::string& id) { 165 void AppSyncBundle::MarkPendingAppSynced(const std::string& id) {
164 pending_sync_data_.erase(id); 166 pending_sync_data_.erase(id);
165 synced_apps_.insert(id); 167 synced_apps_.insert(id);
166 } 168 }
167 169
168 170
169 } // namespace extensions 171 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698