| 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_PENDING_EXTENSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // true if such an extension was found and removed, false otherwise. | 49 // true if such an extension was found and removed, false otherwise. |
| 50 bool Remove(const std::string& id); | 50 bool Remove(const std::string& id); |
| 51 | 51 |
| 52 // Get the information for a pending extension. Returns a pointer to the | 52 // Get the information for a pending extension. Returns a pointer to the |
| 53 // pending extension with id |id|, or NULL if there is no such extension. | 53 // pending extension with id |id|, or NULL if there is no such extension. |
| 54 const PendingExtensionInfo* GetById(const std::string& id) const; | 54 const PendingExtensionInfo* GetById(const std::string& id) const; |
| 55 | 55 |
| 56 // Is |id| in the set of pending extensions? | 56 // Is |id| in the set of pending extensions? |
| 57 bool IsIdPending(const std::string& id) const; | 57 bool IsIdPending(const std::string& id) const; |
| 58 | 58 |
| 59 // Whether there is pending extension install from sync. |
| 60 bool HasPendingExtensionFromSync() const; |
| 61 |
| 59 // Adds an extension in a pending state; the extension with the | 62 // Adds an extension in a pending state; the extension with the |
| 60 // given info will be installed on the next auto-update cycle. | 63 // given info will be installed on the next auto-update cycle. |
| 61 // Return true if the extension was added. Will return false | 64 // Return true if the extension was added. Will return false |
| 62 // if the extension is pending from another source which overrides | 65 // if the extension is pending from another source which overrides |
| 63 // sync installs (such as a policy extension) or if the extension | 66 // sync installs (such as a policy extension) or if the extension |
| 64 // is already installed. | 67 // is already installed. |
| 65 // | 68 // |
| 66 // TODO(akalin): Replace |install_silently| with a list of | 69 // TODO(akalin): Replace |install_silently| with a list of |
| 67 // pre-enabled permissions. | 70 // pre-enabled permissions. |
| 68 bool AddFromSync( | 71 bool AddFromSync( |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 friend void SetupPendingExtensionManagerForTest( | 127 friend void SetupPendingExtensionManagerForTest( |
| 125 int count, const GURL& update_url, | 128 int count, const GURL& update_url, |
| 126 PendingExtensionManager* pending_extension_manager); | 129 PendingExtensionManager* pending_extension_manager); |
| 127 | 130 |
| 128 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager); | 131 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager); |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 } // namespace extensions | 134 } // namespace extensions |
| 132 | 135 |
| 133 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ | 136 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ |
| OLD | NEW |