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

Side by Side Diff: sync/internal_api/public/test/fake_sync_manager.h

Issue 10817023: [Sync] Pass the correct set of enabled types to the sync notifier (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "sync/internal_api/public/sync_manager.h" 10 #include "sync/internal_api/public/sync_manager.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // Returns those types that have been cleaned (purged from the directory) 39 // Returns those types that have been cleaned (purged from the directory)
40 // since the last call to GetAndResetCleanedTypes(), or since startup if never 40 // since the last call to GetAndResetCleanedTypes(), or since startup if never
41 // called. 41 // called.
42 ModelTypeSet GetAndResetCleanedTypes(); 42 ModelTypeSet GetAndResetCleanedTypes();
43 43
44 // Returns those types that have been downloaded since the last call to 44 // Returns those types that have been downloaded since the last call to
45 // GetAndResetDownloadedTypes(), or since startup if never called. 45 // GetAndResetDownloadedTypes(), or since startup if never called.
46 ModelTypeSet GetAndResetDownloadedTypes(); 46 ModelTypeSet GetAndResetDownloadedTypes();
47 47
48 // Returns those types that have been marked as enabled since the
49 // last call to GetAndResetEnabledTypes(), or since startup if never
50 // called.
51 ModelTypeSet GetAndResetEnabledTypes();
52
48 // SyncManager implementation. 53 // SyncManager implementation.
49 // Note: we treat whatever message loop this is called from as the sync 54 // Note: we treat whatever message loop this is called from as the sync
50 // loop for purposes of callbacks. 55 // loop for purposes of callbacks.
51 virtual bool Init( 56 virtual bool Init(
52 const FilePath& database_location, 57 const FilePath& database_location,
53 const WeakHandle<JsEventHandler>& event_handler, 58 const WeakHandle<JsEventHandler>& event_handler,
54 const std::string& sync_server_and_path, 59 const std::string& sync_server_and_path,
55 int sync_server_port, 60 int sync_server_port,
56 bool use_ssl, 61 bool use_ssl,
57 const scoped_refptr<base::TaskRunner>& blocking_task_runner, 62 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ModelTypeSet progress_marker_types_; 113 ModelTypeSet progress_marker_types_;
109 114
110 // Test specific state. 115 // Test specific state.
111 // The types that should fail configuration attempts. These types will not 116 // The types that should fail configuration attempts. These types will not
112 // have their progress markers or initial_sync_ended bits set. 117 // have their progress markers or initial_sync_ended bits set.
113 ModelTypeSet configure_fail_types_; 118 ModelTypeSet configure_fail_types_;
114 // The set of types that have been cleaned up. 119 // The set of types that have been cleaned up.
115 ModelTypeSet cleaned_types_; 120 ModelTypeSet cleaned_types_;
116 // The set of types that have been downloaded. 121 // The set of types that have been downloaded.
117 ModelTypeSet downloaded_types_; 122 ModelTypeSet downloaded_types_;
123 // The set of types that have been enabled.
124 ModelTypeSet enabled_types_;
118 125
119 // For StopSyncingForShutdown's callback. 126 // For StopSyncingForShutdown's callback.
120 MessageLoop* sync_loop_; 127 MessageLoop* sync_loop_;
121 128
122 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); 129 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager);
123 }; 130 };
124 131
125 } // namespace syncer 132 } // namespace syncer
126 133
127 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ 134 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | sync/internal_api/test/fake_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698