| OLD | NEW |
| 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 virtual void TearDown() OVERRIDE; | 58 virtual void TearDown() OVERRIDE; |
| 59 | 59 |
| 60 bool CreateRoot(syncable::ModelType model_type); | 60 bool CreateRoot(syncable::ModelType model_type); |
| 61 | 61 |
| 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 ProfileSyncComponentsFactoryMock factory_; | |
| 69 scoped_ptr<TokenService> token_service_; | 68 scoped_ptr<TokenService> token_service_; |
| 70 scoped_ptr<TestProfileSyncService> service_; | 69 scoped_ptr<TestProfileSyncService> service_; |
| 71 }; | 70 }; |
| 72 | 71 |
| 73 class CreateRootHelper { | 72 class CreateRootHelper { |
| 74 public: | 73 public: |
| 75 CreateRootHelper(AbstractProfileSyncServiceTest* test, | 74 CreateRootHelper(AbstractProfileSyncServiceTest* test, |
| 76 syncable::ModelType model_type); | 75 syncable::ModelType model_type); |
| 77 virtual ~CreateRootHelper(); | 76 virtual ~CreateRootHelper(); |
| 78 | 77 |
| 79 const base::Closure& callback() const; | 78 const base::Closure& callback() const; |
| 80 bool success(); | 79 bool success(); |
| 81 | 80 |
| 82 private: | 81 private: |
| 83 void CreateRootCallback(); | 82 void CreateRootCallback(); |
| 84 | 83 |
| 85 base::Closure callback_; | 84 base::Closure callback_; |
| 86 AbstractProfileSyncServiceTest* test_; | 85 AbstractProfileSyncServiceTest* test_; |
| 87 syncable::ModelType model_type_; | 86 syncable::ModelType model_type_; |
| 88 bool success_; | 87 bool success_; |
| 89 }; | 88 }; |
| 90 | 89 |
| 91 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 90 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
| OLD | NEW |