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