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

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

Issue 6902054: [Sync] Rip out overly-complicated ExtensionData class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed asargent's comments Created 9 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_sync_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_EXTENSION_SYNC_DATA_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/version.h" 11 #include "base/version.h"
12 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
13 13
14 // A struct that encapsulates the synced properties of an Extension. 14 // A struct that encapsulates the synced properties of an Extension.
15 struct ExtensionSyncData { 15 struct ExtensionSyncData {
16 ExtensionSyncData(); 16 ExtensionSyncData();
17 ~ExtensionSyncData(); 17 ~ExtensionSyncData();
18 18
19 // Merge |new_data| into this object. All version-independent
20 // properties are copied from |new_data|, and version-dependent
21 // properties are copied only if |new_data|'s version is equal to or
22 // greater than the current version.
23 void Merge(const ExtensionSyncData& new_data);
24
19 std::string id; 25 std::string id;
20 26
21 // Version-independent properties (i.e., used even when the 27 // Version-independent properties (i.e., used even when the
22 // version of the currently-installed extension doesn't match 28 // version of the currently-installed extension doesn't match
23 // |version|). 29 // |version|).
24 bool uninstalled; 30 bool uninstalled;
25 bool enabled; 31 bool enabled;
26 bool incognito_enabled; 32 bool incognito_enabled;
27 33
28 // Version-dependent properties (i.e., should be used only when the 34 // Version-dependent properties (i.e., should be used only when the
29 // version of the currenty-installed extension matches |version|). 35 // version of the currenty-installed extension matches |version|).
30 Version version; 36 Version version;
31 GURL update_url; 37 GURL update_url;
32
33 // Used only for debugging. 38 // Used only for debugging.
34 std::string name; 39 std::string name;
35 }; 40 };
36 41
37 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ 42 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_sync_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698