Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: chrome/browser/sync/profile_sync_components_factory_mock.cc

Issue 272043002: Invoke AttachmentUploader and update AttachmentIds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android build Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" 5 #include "chrome/browser/sync/profile_sync_components_factory_mock.h"
6 #include "components/sync_driver/change_processor.h" 6 #include "components/sync_driver/change_processor.h"
7 #include "components/sync_driver/model_associator.h" 7 #include "components/sync_driver/model_associator.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "sync/api/attachments/attachment_service_impl.h"
9 #include "sync/internal_api/public/attachments/fake_attachment_store.h" 10 #include "sync/internal_api/public/attachments/fake_attachment_store.h"
10 11
11 using browser_sync::AssociatorInterface; 12 using browser_sync::AssociatorInterface;
12 using browser_sync::ChangeProcessor; 13 using browser_sync::ChangeProcessor;
13 using testing::_; 14 using testing::_;
14 using testing::InvokeWithoutArgs; 15 using testing::InvokeWithoutArgs;
15 16
16 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock() {} 17 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock() {}
17 18
18 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock( 19 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock(
19 AssociatorInterface* model_associator, ChangeProcessor* change_processor) 20 AssociatorInterface* model_associator, ChangeProcessor* change_processor)
20 : model_associator_(model_associator), 21 : model_associator_(model_associator),
21 change_processor_(change_processor) { 22 change_processor_(change_processor) {
22 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). 23 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)).
23 WillByDefault( 24 WillByDefault(
24 InvokeWithoutArgs( 25 InvokeWithoutArgs(
25 this, 26 this,
26 &ProfileSyncComponentsFactoryMock::MakeSyncComponents)); 27 &ProfileSyncComponentsFactoryMock::MakeSyncComponents));
27 } 28 }
28 29
29 ProfileSyncComponentsFactoryMock::~ProfileSyncComponentsFactoryMock() {} 30 ProfileSyncComponentsFactoryMock::~ProfileSyncComponentsFactoryMock() {}
30 31
31 scoped_ptr<syncer::AttachmentStore> 32 scoped_ptr<syncer::AttachmentService>
32 ProfileSyncComponentsFactoryMock::CreateCustomAttachmentStoreForType( 33 ProfileSyncComponentsFactoryMock::CreateAttachmentService(
33 syncer::ModelType type) { 34 syncer::AttachmentService::Delegate* delegate) {
34 scoped_ptr<syncer::AttachmentStore> store( 35 return syncer::AttachmentServiceImpl::CreateForTest();
35 new syncer::FakeAttachmentStore(
36 content::BrowserThread::GetMessageLoopProxyForThread(
37 content::BrowserThread::IO)));
38 return store.Pass();
39 } 36 }
40 37
41 ProfileSyncComponentsFactory::SyncComponents 38 ProfileSyncComponentsFactory::SyncComponents
42 ProfileSyncComponentsFactoryMock::MakeSyncComponents() { 39 ProfileSyncComponentsFactoryMock::MakeSyncComponents() {
43 return SyncComponents(model_associator_.release(), 40 return SyncComponents(model_associator_.release(),
44 change_processor_.release()); 41 change_processor_.release());
45 } 42 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_components_factory_mock.h ('k') | components/sync_driver/fake_generic_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698