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

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

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes mistake in previous patch set. Created 4 years, 11 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 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/extensions/extension_sync_service.h" 5 #include "chrome/browser/extensions/extension_sync_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 } 172 }
173 173
174 bool ExtensionSyncService::HasPendingReenable( 174 bool ExtensionSyncService::HasPendingReenable(
175 const std::string& id, 175 const std::string& id,
176 const base::Version& version) const { 176 const base::Version& version) const {
177 auto it = pending_updates_.find(id); 177 auto it = pending_updates_.find(id);
178 if (it == pending_updates_.end()) 178 if (it == pending_updates_.end())
179 return false; 179 return false;
180 const PendingUpdate& pending = it->second; 180 const PendingUpdate& pending = it->second;
181 return pending.version.Equals(version) && 181 return pending.version == version &&
182 pending.grant_permissions_and_reenable; 182 pending.grant_permissions_and_reenable;
183 } 183 }
184 184
185 syncer::SyncMergeResult ExtensionSyncService::MergeDataAndStartSyncing( 185 syncer::SyncMergeResult ExtensionSyncService::MergeDataAndStartSyncing(
186 syncer::ModelType type, 186 syncer::ModelType type,
187 const syncer::SyncDataList& initial_sync_data, 187 const syncer::SyncDataList& initial_sync_data,
188 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, 188 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
189 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) { 189 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) {
190 CHECK(sync_processor.get()); 190 CHECK(sync_processor.get());
191 LOG_IF(FATAL, type != syncer::EXTENSIONS && type != syncer::APPS) 191 LOG_IF(FATAL, type != syncer::EXTENSIONS && type != syncer::APPS)
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 sync_data_list->push_back(CreateSyncData(*extension)); 704 sync_data_list->push_back(CreateSyncData(*extension));
705 } 705 }
706 } 706 }
707 } 707 }
708 708
709 bool ExtensionSyncService::ShouldSync(const Extension& extension) const { 709 bool ExtensionSyncService::ShouldSync(const Extension& extension) const {
710 // Themes are handled by the ThemeSyncableService. 710 // Themes are handled by the ThemeSyncableService.
711 return extensions::util::ShouldSync(&extension, profile_) && 711 return extensions::util::ShouldSync(&extension, profile_) &&
712 !extension.is_theme(); 712 !extension.is_theme();
713 } 713 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_sync_data_unittest.cc ('k') | chrome/browser/ui/pdf/adobe_reader_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698