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

Side by Side Diff: chrome/browser/sync/glue/fake_generic_change_processor.cc

Issue 187303006: Update sync API to support attachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attachmentapi
Patch Set: Pull in upstream changes. Created 6 years, 9 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/glue/fake_generic_change_processor.h" 5 #include "chrome/browser/sync/glue/fake_generic_change_processor.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "sync/api/attachments/attachment_service.h"
10 #include "sync/api/attachments/attachment_store.h"
11 #include "sync/api/attachments/fake_attachment_service.h"
12 #include "sync/api/attachments/fake_attachment_store.h"
9 #include "sync/api/syncable_service.h" 13 #include "sync/api/syncable_service.h"
10 14
11 namespace browser_sync { 15 namespace browser_sync {
12 16
13 FakeGenericChangeProcessor::FakeGenericChangeProcessor() 17 FakeGenericChangeProcessor::FakeGenericChangeProcessor()
14 : GenericChangeProcessor( 18 : GenericChangeProcessor(NULL,
15 NULL, 19 base::WeakPtr<syncer::SyncableService>(),
16 base::WeakPtr<syncer::SyncableService>(), 20 base::WeakPtr<syncer::SyncMergeResult>(),
17 base::WeakPtr<syncer::SyncMergeResult>(), 21 NULL,
18 NULL), 22 syncer::FakeAttachmentService::CreateForTest()),
19 sync_model_has_user_created_nodes_(true), 23 sync_model_has_user_created_nodes_(true),
20 sync_model_has_user_created_nodes_success_(true), 24 sync_model_has_user_created_nodes_success_(true),
21 crypto_ready_if_necessary_(true) {} 25 crypto_ready_if_necessary_(true) {}
22 26
23 FakeGenericChangeProcessor::~FakeGenericChangeProcessor() {} 27 FakeGenericChangeProcessor::~FakeGenericChangeProcessor() {}
24 28
25 void FakeGenericChangeProcessor::set_process_sync_changes_error( 29 void FakeGenericChangeProcessor::set_process_sync_changes_error(
26 const syncer::SyncError& error) { 30 const syncer::SyncError& error) {
27 process_sync_changes_error_ = error; 31 process_sync_changes_error_ = error;
28 } 32 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 *has_nodes = sync_model_has_user_created_nodes_; 67 *has_nodes = sync_model_has_user_created_nodes_;
64 return sync_model_has_user_created_nodes_success_; 68 return sync_model_has_user_created_nodes_success_;
65 } 69 }
66 70
67 bool FakeGenericChangeProcessor::CryptoReadyIfNecessary( 71 bool FakeGenericChangeProcessor::CryptoReadyIfNecessary(
68 syncer::ModelType type) { 72 syncer::ModelType type) {
69 return crypto_ready_if_necessary_; 73 return crypto_ready_if_necessary_;
70 } 74 }
71 75
72 } // namespace browser_sync 76 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698