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

Side by Side Diff: chrome/browser/sync/test/integration/sync_app_helper.cc

Issue 9595001: Apps on NTP should be in order of installation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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/sync/test/integration/sync_app_helper.h" 5 #include "chrome/browser/sync/test/integration/sync_app_helper.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_sorting.h" 8 #include "chrome/browser/extensions/extension_sorting.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sync/test/integration/extensions_helper.h" 10 #include "chrome/browser/sync/test/integration/extensions_helper.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 it != extensions->end(); ++it) { 59 it != extensions->end(); ++it) {
60 if ((*it)->GetSyncType() == Extension::SYNC_TYPE_APP) { 60 if ((*it)->GetSyncType() == Extension::SYNC_TYPE_APP) {
61 const std::string& id = (*it)->id(); 61 const std::string& id = (*it)->id();
62 LoadApp(extension_service, id, &(app_state_map[id])); 62 LoadApp(extension_service, id, &(app_state_map[id]));
63 } 63 }
64 } 64 }
65 65
66 const PendingExtensionManager* pending_extension_manager = 66 const PendingExtensionManager* pending_extension_manager =
67 extension_service->pending_extension_manager(); 67 extension_service->pending_extension_manager();
68 68
69 std::set<std::string> pending_crx_ids; 69 std::list<std::string> pending_crx_ids;
70 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_crx_ids); 70 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_crx_ids);
71 71
72 for (std::set<std::string>::const_iterator id = pending_crx_ids.begin(); 72 for (std::list<std::string>::const_iterator id = pending_crx_ids.begin();
73 id != pending_crx_ids.end(); ++id) { 73 id != pending_crx_ids.end(); ++id) {
74 LoadApp(extension_service, *id, &(app_state_map[*id])); 74 LoadApp(extension_service, *id, &(app_state_map[*id]));
75 } 75 }
76 76
77 return app_state_map; 77 return app_state_map;
78 } 78 }
79 79
80 } // namespace 80 } // namespace
81 81
82 SyncAppHelper* SyncAppHelper::GetInstance() { 82 SyncAppHelper* SyncAppHelper::GetInstance() {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { 169 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) {
170 profile->GetExtensionService()->extension_prefs()-> 170 profile->GetExtensionService()->extension_prefs()->
171 extension_sorting()->FixNTPOrdinalCollisions(); 171 extension_sorting()->FixNTPOrdinalCollisions();
172 } 172 }
173 173
174 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} 174 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {}
175 175
176 SyncAppHelper::~SyncAppHelper() {} 176 SyncAppHelper::~SyncAppHelper() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698