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

Side by Side Diff: chrome/browser/sync/abstract_profile_sync_service_test.h

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better 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 CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ 5 #ifndef CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_
6 #define CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ 6 #define CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 class AbstractProfileSyncServiceTest : public testing::Test { 50 class AbstractProfileSyncServiceTest : public testing::Test {
51 public: 51 public:
52 AbstractProfileSyncServiceTest(); 52 AbstractProfileSyncServiceTest();
53 virtual ~AbstractProfileSyncServiceTest(); 53 virtual ~AbstractProfileSyncServiceTest();
54 54
55 virtual void SetUp() OVERRIDE; 55 virtual void SetUp() OVERRIDE;
56 56
57 virtual void TearDown() OVERRIDE; 57 virtual void TearDown() OVERRIDE;
58 58
59 bool CreateRoot(syncer::ModelType model_type); 59 bool CreateRoot(syncer::ModelType model_type, syncer::UserShare* user_share);
60 60
61 static ProfileKeyedService* BuildTokenService(Profile* profile); 61 static ProfileKeyedService* BuildTokenService(Profile* profile);
62 protected: 62 protected:
63 MessageLoopForUI ui_loop_; 63 MessageLoopForUI ui_loop_;
64 content::TestBrowserThread ui_thread_; 64 content::TestBrowserThread ui_thread_;
65 content::TestBrowserThread db_thread_; 65 content::TestBrowserThread db_thread_;
66 content::TestBrowserThread file_thread_; 66 content::TestBrowserThread file_thread_;
67 content::TestBrowserThread io_thread_; 67 content::TestBrowserThread io_thread_;
68 TokenService* token_service_; 68 TokenService* token_service_;
69 scoped_ptr<TestProfileSyncService> service_; 69 scoped_ptr<TestProfileSyncService> service_;
70 }; 70 };
71 71
72 class CreateRootHelper { 72 class CreateRootHelper {
73 public: 73 public:
74 CreateRootHelper(AbstractProfileSyncServiceTest* test, 74 CreateRootHelper(AbstractProfileSyncServiceTest* test,
75 syncer::ModelType model_type); 75 syncer::ModelType model_type);
76 virtual ~CreateRootHelper(); 76 virtual ~CreateRootHelper();
77 77
78 const base::Closure& callback() const; 78 const base::Callback<void(syncer::UserShare*)>& callback() const;
79 bool success(); 79 bool success();
80 80
81 private: 81 private:
82 void CreateRootCallback(); 82 void CreateRootCallback(syncer::UserShare*);
83 83
84 base::Closure callback_; 84 base::Callback<void(syncer::UserShare*)> callback_;
85 AbstractProfileSyncServiceTest* test_; 85 AbstractProfileSyncServiceTest* test_;
86 syncer::ModelType model_type_; 86 syncer::ModelType model_type_;
87 bool success_; 87 bool success_;
88 }; 88 };
89 89
90 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ 90 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698