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

Unified Diff: chrome/browser/extensions/pending_extension_info.h

Issue 9595001: Apps on NTP should be in order of installation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: A few fixes per comments made Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/pending_extension_info.h
diff --git a/chrome/browser/extensions/pending_extension_info.h b/chrome/browser/extensions/pending_extension_info.h
index 7ab82d4dd8fa56e0ec9e1f2f287fbe394866b2d7..1c4c26c4963db863c2852e39d146addf0b5e0936 100644
--- a/chrome/browser/extensions/pending_extension_info.h
+++ b/chrome/browser/extensions/pending_extension_info.h
@@ -21,6 +21,7 @@ class PendingExtensionInfo {
typedef bool (*ShouldAllowInstallPredicate)(const Extension&);
PendingExtensionInfo(
+ const std::string& id,
const GURL& update_url,
ShouldAllowInstallPredicate should_allow_install,
bool is_from_sync,
@@ -30,6 +31,7 @@ class PendingExtensionInfo {
// Required for STL container membership. Should not be used directly.
PendingExtensionInfo();
+ const std::string& id() const { return id_; }
const GURL& update_url() const { return update_url_; }
// ShouldAllowInstall() returns the result of running constructor argument
@@ -46,6 +48,8 @@ class PendingExtensionInfo {
Extension::Location install_source() const { return install_source_; }
private:
+ const std::string& id_;
+
GURL update_url_;
// When the extension is about to be installed, this function is
@@ -60,4 +64,16 @@ class PendingExtensionInfo {
FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, AddPendingExtensionFromSync);
};
+// A small functor for determining equality by comparing PendingExtensionInfos'
+// ids
+class IsId {
Aaron Boodman 2012/04/09 17:02:14 This class is such a special-case need, it seems l
Aaron Boodman 2012/04/09 17:02:14 Also, the name is not descriptive enough. How abou
+ public:
+ IsId(const std::string& first) : first_(first) {}
+
+ bool operator ()(const PendingExtensionInfo& second) const;
+
+ private:
+ const std::string first_;
+};
+
#endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_INFO_H_

Powered by Google App Engine
This is Rietveld 408576698