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

Side by Side Diff: chrome/browser/sync/glue/generic_change_processor.cc

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/glue/generic_change_processor.h" 5 #include "chrome/browser/sync/glue/generic_change_processor.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/sync/api/sync_change.h" 9 #include "chrome/browser/sync/api/sync_change.h"
10 #include "chrome/browser/sync/api/sync_error.h" 10 #include "chrome/browser/sync/api/sync_error.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // children. 245 // children.
246 *has_nodes = type_root_node.HasChildren(); 246 *has_nodes = type_root_node.HasChildren();
247 return true; 247 return true;
248 } 248 }
249 249
250 bool GenericChangeProcessor::CryptoReadyIfNecessary(syncable::ModelType type) { 250 bool GenericChangeProcessor::CryptoReadyIfNecessary(syncable::ModelType type) {
251 DCHECK(CalledOnValidThread()); 251 DCHECK(CalledOnValidThread());
252 DCHECK_NE(type, syncable::UNSPECIFIED); 252 DCHECK_NE(type, syncable::UNSPECIFIED);
253 // We only access the cryptographer while holding a transaction. 253 // We only access the cryptographer while holding a transaction.
254 sync_api::ReadTransaction trans(FROM_HERE, share_handle()); 254 sync_api::ReadTransaction trans(FROM_HERE, share_handle());
255 const syncable::ModelEnumSet encrypted_types = GetEncryptedTypes(&trans); 255 const syncable::ModelTypeSet encrypted_types = GetEncryptedTypes(&trans);
256 return !encrypted_types.Has(type) || 256 return !encrypted_types.Has(type) ||
257 trans.GetCryptographer()->is_ready(); 257 trans.GetCryptographer()->is_ready();
258 } 258 }
259 259
260 void GenericChangeProcessor::StartImpl(Profile* profile) { 260 void GenericChangeProcessor::StartImpl(Profile* profile) {
261 DCHECK(CalledOnValidThread()); 261 DCHECK(CalledOnValidThread());
262 } 262 }
263 263
264 void GenericChangeProcessor::StopImpl() { 264 void GenericChangeProcessor::StopImpl() {
265 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 265 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
266 } 266 }
267 267
268 sync_api::UserShare* GenericChangeProcessor::share_handle() const { 268 sync_api::UserShare* GenericChangeProcessor::share_handle() const {
269 DCHECK(CalledOnValidThread()); 269 DCHECK(CalledOnValidThread());
270 return share_handle_; 270 return share_handle_;
271 } 271 }
272 272
273 } // namespace browser_sync 273 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_mock.cc ('k') | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698