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

Side by Side Diff: sync/internal_api/sync_manager_impl_unittest.cc

Issue 1104543005: Update {virtual,override} to follow C++11 style in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Unit tests for the SyncApi. Note that a lot of the underlying 5 // Unit tests for the SyncApi. Note that a lot of the underlying
6 // functionality is provided by the Syncable layer, which has its own 6 // functionality is provided by the Syncable layer, which has its own
7 // unit tests. We'll test SyncApi specific things in this harness. 7 // unit tests. We'll test SyncApi specific things in this harness.
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 (*out)[PRIORITY_PREFERENCES] = GROUP_PASSIVE; 896 (*out)[PRIORITY_PREFERENCES] = GROUP_PASSIVE;
897 (*out)[ARTICLES] = GROUP_PASSIVE; 897 (*out)[ARTICLES] = GROUP_PASSIVE;
898 } 898 }
899 899
900 ModelTypeSet GetEnabledTypes() { 900 ModelTypeSet GetEnabledTypes() {
901 ModelSafeRoutingInfo routing_info; 901 ModelSafeRoutingInfo routing_info;
902 GetModelSafeRoutingInfo(&routing_info); 902 GetModelSafeRoutingInfo(&routing_info);
903 return GetRoutingInfoTypes(routing_info); 903 return GetRoutingInfoTypes(routing_info);
904 } 904 }
905 905
906 virtual void OnChangesApplied( 906 void OnChangesApplied(
907 ModelType model_type, 907 ModelType model_type,
908 int64 model_version, 908 int64 model_version,
909 const BaseTransaction* trans, 909 const BaseTransaction* trans,
910 const ImmutableChangeRecordList& changes) override {} 910 const ImmutableChangeRecordList& changes) override {}
911 911
912 virtual void OnChangesComplete(ModelType model_type) override {} 912 void OnChangesComplete(ModelType model_type) override {}
913 913
914 // Helper methods. 914 // Helper methods.
915 bool SetUpEncryption(NigoriStatus nigori_status, 915 bool SetUpEncryption(NigoriStatus nigori_status,
916 EncryptionStatus encryption_status) { 916 EncryptionStatus encryption_status) {
917 UserShare* share = sync_manager_.GetUserShare(); 917 UserShare* share = sync_manager_.GetUserShare();
918 918
919 // We need to create the nigori node as if it were an applied server update. 919 // We need to create the nigori node as if it were an applied server update.
920 int64 nigori_id = GetIdForDataType(NIGORI); 920 int64 nigori_id = GetIdForDataType(NIGORI);
921 if (nigori_id == kInvalidId) 921 if (nigori_id == kInvalidId)
922 return false; 922 return false;
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
3197 // SyncManagerInitInvalidStorageTest::GetFactory will return 3197 // SyncManagerInitInvalidStorageTest::GetFactory will return
3198 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails. 3198 // DirectoryBackingStore that ensures that SyncManagerImpl::OpenDirectory fails.
3199 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's 3199 // SyncManagerImpl initialization is done in SyncManagerTest::SetUp. This test's
3200 // task is to ensure that SyncManagerImpl reported initialization failure in 3200 // task is to ensure that SyncManagerImpl reported initialization failure in
3201 // OnInitializationComplete callback. 3201 // OnInitializationComplete callback.
3202 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) { 3202 TEST_F(SyncManagerInitInvalidStorageTest, FailToOpenDatabase) {
3203 EXPECT_FALSE(initialization_succeeded_); 3203 EXPECT_FALSE(initialization_succeeded_);
3204 } 3204 }
3205 3205
3206 } // namespace syncer 3206 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_backup_manager_unittest.cc ('k') | sync/internal_api/sync_rollback_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698