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

Side by Side Diff: chrome/browser/extensions/app_sync_data.h

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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
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 #ifndef CHROME_BROWSER_EXTENSIONS_APP_SYNC_DATA_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_SYNC_DATA_H_
6 #define CHROME_BROWSER_EXTENSIONS_APP_SYNC_DATA_H_ 6 #define CHROME_BROWSER_EXTENSIONS_APP_SYNC_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/extensions/extension_sync_data.h" 9 #include "chrome/browser/extensions/extension_sync_data.h"
10 #include "chrome/common/string_ordinal.h" 10 #include "chrome/common/string_ordinal.h"
11 #include "sync/api/sync_change.h" 11 #include "sync/api/sync_change.h"
12 12
13 namespace csync { 13 namespace syncer {
14 class SyncData; 14 class SyncData;
15 } 15 }
16 16
17 namespace sync_pb { 17 namespace sync_pb {
18 class AppSpecifics; 18 class AppSpecifics;
19 } 19 }
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 class Extension; 23 class Extension;
24 class ExtensionSyncData; 24 class ExtensionSyncData;
25 25
26 // A class that encapsulates the synced properties of an Application. 26 // A class that encapsulates the synced properties of an Application.
27 class AppSyncData { 27 class AppSyncData {
28 public: 28 public:
29 AppSyncData(); 29 AppSyncData();
30 explicit AppSyncData(const csync::SyncData& sync_data); 30 explicit AppSyncData(const syncer::SyncData& sync_data);
31 explicit AppSyncData(const csync::SyncChange& sync_change); 31 explicit AppSyncData(const syncer::SyncChange& sync_change);
32 AppSyncData(const Extension& extension, 32 AppSyncData(const Extension& extension,
33 bool enabled, 33 bool enabled,
34 bool incognito_enabled, 34 bool incognito_enabled,
35 const std::string& notifications_client_id, 35 const std::string& notifications_client_id,
36 bool notifications_disabled, 36 bool notifications_disabled,
37 const StringOrdinal& app_launch_ordinal, 37 const StringOrdinal& app_launch_ordinal,
38 const StringOrdinal& page_ordinal); 38 const StringOrdinal& page_ordinal);
39 ~AppSyncData(); 39 ~AppSyncData();
40 40
41 // Retrive sync data from this class. 41 // Retrive sync data from this class.
42 csync::SyncData GetSyncData() const; 42 syncer::SyncData GetSyncData() const;
43 csync::SyncChange GetSyncChange( 43 syncer::SyncChange GetSyncChange(
44 csync::SyncChange::SyncChangeType change_type) const; 44 syncer::SyncChange::SyncChangeType change_type) const;
45 45
46 const std::string& id() const { return extension_sync_data_.id(); } 46 const std::string& id() const { return extension_sync_data_.id(); }
47 47
48 bool uninstalled() const { return extension_sync_data_.uninstalled(); } 48 bool uninstalled() const { return extension_sync_data_.uninstalled(); }
49 49
50 const std::string& notifications_client_id() const { 50 const std::string& notifications_client_id() const {
51 return notifications_client_id_; 51 return notifications_client_id_;
52 } 52 }
53 53
54 bool notifications_disabled() const { 54 bool notifications_disabled() const {
(...skipping 11 matching lines...) Expand all
66 return extension_sync_data_; 66 return extension_sync_data_;
67 } 67 }
68 68
69 private: 69 private:
70 // Convert an AppSyncData back out to a sync structure. 70 // Convert an AppSyncData back out to a sync structure.
71 void PopulateAppSpecifics(sync_pb::AppSpecifics* specifics) const; 71 void PopulateAppSpecifics(sync_pb::AppSpecifics* specifics) const;
72 72
73 // Populate this class from sync inputs. 73 // Populate this class from sync inputs.
74 void PopulateFromAppSpecifics( 74 void PopulateFromAppSpecifics(
75 const sync_pb::AppSpecifics& specifics); 75 const sync_pb::AppSpecifics& specifics);
76 void PopulateFromSyncData(const csync::SyncData& sync_data); 76 void PopulateFromSyncData(const syncer::SyncData& sync_data);
77 77
78 ExtensionSyncData extension_sync_data_; 78 ExtensionSyncData extension_sync_data_;
79 std::string notifications_client_id_; 79 std::string notifications_client_id_;
80 bool notifications_disabled_; 80 bool notifications_disabled_;
81 StringOrdinal app_launch_ordinal_; 81 StringOrdinal app_launch_ordinal_;
82 StringOrdinal page_ordinal_; 82 StringOrdinal page_ordinal_;
83 }; 83 };
84 84
85 } // namespace extensions 85 } // namespace extensions
86 86
87 #endif // CHROME_BROWSER_EXTENSIONS_APP_SYNC_DATA_H_ 87 #endif // CHROME_BROWSER_EXTENSIONS_APP_SYNC_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_sync_bundle.cc ('k') | chrome/browser/extensions/app_sync_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698