OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 virtual ~AbstractProfileSyncServiceTest(); | 43 virtual ~AbstractProfileSyncServiceTest(); |
44 | 44 |
45 virtual void SetUp() OVERRIDE; | 45 virtual void SetUp() OVERRIDE; |
46 | 46 |
47 virtual void TearDown() OVERRIDE; | 47 virtual void TearDown() OVERRIDE; |
48 | 48 |
49 bool CreateRoot(syncer::ModelType model_type); | 49 bool CreateRoot(syncer::ModelType model_type); |
50 | 50 |
51 static ProfileKeyedService* BuildTokenService(Profile* profile); | 51 static ProfileKeyedService* BuildTokenService(Profile* profile); |
52 protected: | 52 protected: |
53 MessageLoopForUI ui_loop_; | 53 base::MessageLoopForUI ui_loop_; |
54 content::TestBrowserThread ui_thread_; | 54 content::TestBrowserThread ui_thread_; |
55 content::TestBrowserThread db_thread_; | 55 content::TestBrowserThread db_thread_; |
56 content::TestBrowserThread file_thread_; | 56 content::TestBrowserThread file_thread_; |
57 content::TestBrowserThread io_thread_; | 57 content::TestBrowserThread io_thread_; |
58 TokenService* token_service_; | 58 TokenService* token_service_; |
59 TestProfileSyncService* sync_service_; | 59 TestProfileSyncService* sync_service_; |
60 }; | 60 }; |
61 | 61 |
62 class CreateRootHelper { | 62 class CreateRootHelper { |
63 public: | 63 public: |
64 CreateRootHelper(AbstractProfileSyncServiceTest* test, | 64 CreateRootHelper(AbstractProfileSyncServiceTest* test, |
65 syncer::ModelType model_type); | 65 syncer::ModelType model_type); |
66 virtual ~CreateRootHelper(); | 66 virtual ~CreateRootHelper(); |
67 | 67 |
68 const base::Closure& callback() const; | 68 const base::Closure& callback() const; |
69 bool success(); | 69 bool success(); |
70 | 70 |
71 private: | 71 private: |
72 void CreateRootCallback(); | 72 void CreateRootCallback(); |
73 | 73 |
74 base::Closure callback_; | 74 base::Closure callback_; |
75 AbstractProfileSyncServiceTest* test_; | 75 AbstractProfileSyncServiceTest* test_; |
76 syncer::ModelType model_type_; | 76 syncer::ModelType model_type_; |
77 bool success_; | 77 bool success_; |
78 }; | 78 }; |
79 | 79 |
80 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 80 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
OLD | NEW |