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