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

Side by Side Diff: chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc

Issue 2819413003: Refactor extension app icon. (Closed)
Patch Set: nits Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/arc/arc_package_syncable_service.h" 5 #include "chrome/browser/ui/app_list/arc/arc_package_syncable_service.h"
6 6
7 #include <unordered_set> 7 #include <unordered_set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 if (flare_.is_null()) { 231 if (flare_.is_null()) {
232 VLOG(2) << this << ": SyncStarted: Flare."; 232 VLOG(2) << this << ": SyncStarted: Flare.";
233 flare_ = sync_start_util::GetFlareForSyncableService(profile_->GetPath()); 233 flare_ = sync_start_util::GetFlareForSyncableService(profile_->GetPath());
234 flare_.Run(syncer::ARC_PACKAGE); 234 flare_.Run(syncer::ARC_PACKAGE);
235 } 235 }
236 return false; 236 return false;
237 } 237 }
238 238
239 // ArcPackageSyncableService private 239 // ArcPackageSyncableService private
240 void ArcPackageSyncableService::OnPackageRemoved( 240 void ArcPackageSyncableService::OnPackageRemoved(
241 const std::string& package_name) { 241 const std::string& package_name,
242 bool uninstalled) {
243 if (!uninstalled)
244 return;
245
242 SyncItemMap::iterator delete_iter = 246 SyncItemMap::iterator delete_iter =
243 pending_uninstall_items_.find(package_name); 247 pending_uninstall_items_.find(package_name);
244 248
245 // Pending uninstall item. Confirm uninstall. 249 // Pending uninstall item. Confirm uninstall.
246 if (delete_iter != pending_uninstall_items_.end()) { 250 if (delete_iter != pending_uninstall_items_.end()) {
247 pending_uninstall_items_.erase(delete_iter); 251 pending_uninstall_items_.erase(delete_iter);
248 return; 252 return;
249 } 253 }
250 254
251 SyncItemMap::iterator iter = sync_items_.find(package_name); 255 SyncItemMap::iterator iter = sync_items_.find(package_name);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 438
435 bool ArcPackageSyncableService::ShouldSyncPackage( 439 bool ArcPackageSyncableService::ShouldSyncPackage(
436 const std::string& package_name) const { 440 const std::string& package_name) const {
437 std::unique_ptr<ArcAppListPrefs::PackageInfo> package( 441 std::unique_ptr<ArcAppListPrefs::PackageInfo> package(
438 prefs_->GetPackage(package_name)); 442 prefs_->GetPackage(package_name));
439 DCHECK(package.get()); 443 DCHECK(package.get());
440 return package->should_sync; 444 return package->should_sync;
441 } 445 }
442 446
443 } // namespace arc 447 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698