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