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

Side by Side Diff: components/sync_driver/sync_api_component_factory.h

Issue 272043002: Invoke AttachmentUploader and update AttachmentIds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize through SyncApiComponentFactory 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_
6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "sync/api/attachments/attachment_service.h"
10 #include "sync/api/attachments/attachment_store.h" 11 #include "sync/api/attachments/attachment_store.h"
maniscalco 2014/05/15 20:09:28 No longer needed?
pavely 2014/05/16 00:19:10 Done.
11 #include "sync/api/syncable_service.h" 12 #include "sync/api/syncable_service.h"
12 #include "sync/internal_api/public/base/model_type.h" 13 #include "sync/internal_api/public/base/model_type.h"
13 14
14 namespace browser_sync { 15 namespace browser_sync {
15 16
16 // This factory provides sync driver code with the model type specific sync/api 17 // This factory provides sync driver code with the model type specific sync/api
17 // service (like SyncableService) implementations. 18 // service (like SyncableService) implementations.
18 class SyncApiComponentFactory { 19 class SyncApiComponentFactory {
19 public: 20 public:
20 // Returns a weak pointer to the syncable service specified by |type|. 21 // Returns a weak pointer to the syncable service specified by |type|.
21 // Weak pointer may be unset if service is already destroyed. 22 // Weak pointer may be unset if service is already destroyed.
22 // Note: Should only be called from the model type thread. 23 // Note: Should only be called from the model type thread.
23 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 24 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
24 syncer::ModelType type) = 0; 25 syncer::ModelType type) = 0;
25 26
26 // Returns the custom attachment store for a model type, if there is one. 27 // Creates attachment service.
27 // May return NULL, which implies sync should use a default implementation.
28 // Note: Should only be called from the model type thread. 28 // Note: Should only be called from the model type thread.
maniscalco 2014/05/15 20:09:28 Please document the delegate parameter (does not o
pavely 2014/05/16 00:19:10 Done.
29 virtual scoped_ptr<syncer::AttachmentStore> 29 virtual scoped_ptr<syncer::AttachmentService> CreateAttachmentService(
30 CreateCustomAttachmentStoreForType(syncer::ModelType type) = 0; 30 syncer::AttachmentService::Delegate* delegate) = 0;
31 }; 31 };
32 32
33 } // namespace browser_sync 33 } // namespace browser_sync
34 34
35 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ 35 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698