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

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

Issue 11411227: Garbage collect extensions only if there are no pending extension installs that could still be usin… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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_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
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 // Returns true if there are any extensions pending.
60 bool HasPendingExtensions() const;
61
59 // Whether there is pending extension install from sync. 62 // Whether there is pending extension install from sync.
60 bool HasPendingExtensionFromSync() const; 63 bool HasPendingExtensionFromSync() const;
61 64
62 // Adds an extension in a pending state; the extension with the 65 // Adds an extension in a pending state; the extension with the
63 // given info will be installed on the next auto-update cycle. 66 // given info will be installed on the next auto-update cycle.
64 // Return true if the extension was added. Will return false 67 // Return true if the extension was added. Will return false
65 // if the extension is pending from another source which overrides 68 // if the extension is pending from another source which overrides
66 // sync installs (such as a policy extension) or if the extension 69 // sync installs (such as a policy extension) or if the extension
67 // is already installed. 70 // is already installed.
68 // 71 //
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 friend void SetupPendingExtensionManagerForTest( 130 friend void SetupPendingExtensionManagerForTest(
128 int count, const GURL& update_url, 131 int count, const GURL& update_url,
129 PendingExtensionManager* pending_extension_manager); 132 PendingExtensionManager* pending_extension_manager);
130 133
131 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager); 134 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager);
132 }; 135 };
133 136
134 } // namespace extensions 137 } // namespace extensions
135 138
136 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ 139 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698