| OLD | NEW |
| 1 // Copyright (c) 20111 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 5 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/engine/syncapi.h" | 7 #include "chrome/browser/sync/engine/syncapi.h" |
| 8 #include "chrome/browser/sync/glue/autofill_model_associator.h" | 8 #include "chrome/browser/sync/glue/autofill_model_associator.h" |
| 9 #include "chrome/browser/sync/glue/autofill_profile_model_associator.h" | 9 #include "chrome/browser/sync/glue/autofill_profile_model_associator.h" |
| 10 #include "chrome/browser/sync/glue/password_model_associator.h" | 10 #include "chrome/browser/sync/glue/password_model_associator.h" |
| 11 #include "chrome/browser/sync/glue/preference_model_associator.h" | 11 #include "chrome/browser/sync/glue/preference_model_associator.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 sync_pb::EntitySpecifics specifics; | 91 sync_pb::EntitySpecifics specifics; |
| 92 syncable::AddDefaultExtensionValue(model_type, &specifics); | 92 syncable::AddDefaultExtensionValue(model_type, &specifics); |
| 93 node.Put(SPECIFICS, specifics); | 93 node.Put(SPECIFICS, specifics); |
| 94 | 94 |
| 95 return true; | 95 return true; |
| 96 } | 96 } |
| 97 | 97 |
| 98 AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest() | 98 AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest() |
| 99 : ui_thread_(BrowserThread::UI, &message_loop_) {} | 99 : ui_thread_(BrowserThread::UI, &message_loop_) {} |
| 100 | 100 |
| 101 AbstractProfileSyncServiceTest::~AbstractProfileSyncServiceTest() {} |
| 102 |
| 101 bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) { | 103 bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) { |
| 102 return ProfileSyncServiceTestHelper::CreateRoot( | 104 return ProfileSyncServiceTestHelper::CreateRoot( |
| 103 model_type, | 105 model_type, |
| 104 service_->GetUserShare(), | 106 service_->GetUserShare(), |
| 105 service_->id_factory()); | 107 service_->id_factory()); |
| 106 } | 108 } |
| 107 | 109 |
| 108 CreateRootTask::CreateRootTask( | 110 CreateRootTask::CreateRootTask( |
| 109 AbstractProfileSyncServiceTest* test, ModelType model_type) | 111 AbstractProfileSyncServiceTest* test, ModelType model_type) |
| 110 : test_(test), model_type_(model_type), success_(false) { | 112 : test_(test), model_type_(model_type), success_(false) { |
| 111 } | 113 } |
| 112 | 114 |
| 113 CreateRootTask::~CreateRootTask() {} | 115 CreateRootTask::~CreateRootTask() {} |
| 114 void CreateRootTask::Run() { | 116 void CreateRootTask::Run() { |
| 115 success_ = test_->CreateRoot(model_type_); | 117 success_ = test_->CreateRoot(model_type_); |
| 116 } | 118 } |
| 117 | 119 |
| 118 bool CreateRootTask::success() { | 120 bool CreateRootTask::success() { |
| 119 return success_; | 121 return success_; |
| 120 } | 122 } |
| OLD | NEW |