OLD | NEW |
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_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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/version.h" | 10 #include "base/version.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 // Version-independent properties (i.e., used even when the | 53 // Version-independent properties (i.e., used even when the |
54 // version of the currently-installed extension doesn't match | 54 // version of the currently-installed extension doesn't match |
55 // |version|). | 55 // |version|). |
56 bool uninstalled() const { return uninstalled_; } | 56 bool uninstalled() const { return uninstalled_; } |
57 bool enabled() const { return enabled_; } | 57 bool enabled() const { return enabled_; } |
58 bool incognito_enabled() const { return incognito_enabled_; } | 58 bool incognito_enabled() const { return incognito_enabled_; } |
59 | 59 |
60 // Version-dependent properties (i.e., should be used only when the | 60 // Version-dependent properties (i.e., should be used only when the |
61 // version of the currenty-installed extension matches |version|). | 61 // version of the currenty-installed extension matches |version|). |
62 const Version& version() const { return version_; } | 62 const base::Version& version() const { return version_; } |
63 const GURL& update_url() const { return update_url_; } | 63 const GURL& update_url() const { return update_url_; } |
64 // Used only for debugging. | 64 // Used only for debugging. |
65 const std::string& name() const { return name_; } | 65 const std::string& name() const { return name_; } |
66 | 66 |
67 private: | 67 private: |
68 // Populate this class from sync inputs. | 68 // Populate this class from sync inputs. |
69 void PopulateFromSyncData(const syncer::SyncData& sync_data); | 69 void PopulateFromSyncData(const syncer::SyncData& sync_data); |
70 | 70 |
71 std::string id_; | 71 std::string id_; |
72 bool uninstalled_; | 72 bool uninstalled_; |
73 bool enabled_; | 73 bool enabled_; |
74 bool incognito_enabled_; | 74 bool incognito_enabled_; |
75 Version version_; | 75 base::Version version_; |
76 GURL update_url_; | 76 GURL update_url_; |
77 std::string name_; | 77 std::string name_; |
78 }; | 78 }; |
79 | 79 |
80 } // namespace extensions | 80 } // namespace extensions |
81 | 81 |
82 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ | 82 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ |
OLD | NEW |