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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 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 | 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/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 credentials, 426 credentials,
427 delete_sync_data_folder, 427 delete_sync_data_folder,
428 notifier_options_); 428 notifier_options_);
429 } 429 }
430 430
431 void ProfileSyncService::CreateBackend() { 431 void ProfileSyncService::CreateBackend() {
432 backend_.reset(new SyncBackendHost(profile_)); 432 backend_.reset(new SyncBackendHost(profile_));
433 } 433 }
434 434
435 bool ProfileSyncService::IsEncryptedDatatypeEnabled() const { 435 bool ProfileSyncService::IsEncryptedDatatypeEnabled() const {
436 return encrypted_types_.size() > 0; 436 return !encrypted_types_.empty();
437 } 437 }
438 438
439 void ProfileSyncService::StartUp() { 439 void ProfileSyncService::StartUp() {
440 // Don't start up multiple times. 440 // Don't start up multiple times.
441 if (backend_.get()) { 441 if (backend_.get()) {
442 VLOG(1) << "Skipping bringing up backend host."; 442 VLOG(1) << "Skipping bringing up backend host.";
443 return; 443 return;
444 } 444 }
445 445
446 DCHECK(AreCredentialsAvailable()); 446 DCHECK(AreCredentialsAvailable());
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 // is initialized, all enabled data types are consistent with one 1348 // is initialized, all enabled data types are consistent with one
1349 // another, and no unrecoverable error has transpired. 1349 // another, and no unrecoverable error has transpired.
1350 if (unrecoverable_error_detected_) 1350 if (unrecoverable_error_detected_)
1351 return false; 1351 return false;
1352 1352
1353 if (!data_type_manager_.get()) 1353 if (!data_type_manager_.get())
1354 return false; 1354 return false;
1355 1355
1356 return data_type_manager_->state() == DataTypeManager::CONFIGURED; 1356 return data_type_manager_->state() == DataTypeManager::CONFIGURED;
1357 } 1357 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/foreign_session_tracker.cc ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698