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

Side by Side Diff: chrome/browser/sync/glue/extension_model_associator.h

Issue 7564037: Apps/Extensions Sync refactoring -- delete most of the old glue, implement new sync API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Release build warning :-/ Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "chrome/browser/sync/api/sync_error.h"
11 #include "chrome/browser/sync/glue/extension_sync_traits.h"
12 #include "chrome/browser/sync/glue/model_associator.h"
13 #include "chrome/browser/sync/syncable/model_type.h"
14
15 class ExtensionServiceInterface;
16
17 namespace sync_api {
18 struct UserShare;
19 } // namespace sync_api
20
21 namespace browser_sync {
22
23 // Contains all logic for associating the Chrome extensions model and
24 // the sync extensions model.
25 class ExtensionModelAssociator : public AssociatorInterface {
26 public:
27 // Does not take ownership of |extension_service| or |user_share|.
28 ExtensionModelAssociator(ExtensionServiceInterface* extension_service,
29 sync_api::UserShare* user_share);
30 virtual ~ExtensionModelAssociator();
31
32 // Used by profile_sync_test_util.h.
33 static syncable::ModelType model_type() { return syncable::EXTENSIONS; }
34
35 // AssociatorInterface implementation.
36 virtual bool AssociateModels(SyncError* error);
37 virtual bool DisassociateModels(SyncError* error);
38 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes);
39 virtual void AbortAssociation();
40 virtual bool CryptoReadyIfNecessary();
41 private:
42 const ExtensionSyncTraits traits_;
43 ExtensionServiceInterface* const extension_service_;
44 sync_api::UserShare* const user_share_;
45
46 DISALLOW_COPY_AND_ASSIGN(ExtensionModelAssociator);
47 };
48
49 } // namespace browser_sync
50
51 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/extension_change_processor.cc ('k') | chrome/browser/sync/glue/extension_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698