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

Unified Diff: extensions/common/user_script.cc

Issue 2228743002: Rework some UserScriptLoader logic in preparation to removing UserScript copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 4 years, 4 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
« no previous file with comments | « extensions/common/user_script.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/user_script.cc
diff --git a/extensions/common/user_script.cc b/extensions/common/user_script.cc
index 20bff9f159c4b8954ef39c50a1254367d787030c..ddf1fb39c0545226441ebdcd0809d996483d004f 100644
--- a/extensions/common/user_script.cc
+++ b/extensions/common/user_script.cc
@@ -288,6 +288,15 @@ void UserScript::UnpickleScripts(const base::Pickle& pickle,
}
}
+UserScriptIDPair::UserScriptIDPair(int id, const HostID& host_id)
+ : id(id), host_id(host_id) {}
+
+UserScriptIDPair::UserScriptIDPair(int id) : id(id), host_id(HostID()) {}
+
+bool operator<(const UserScriptIDPair& a, const UserScriptIDPair& b) {
+ return a.id < b.id;
+}
+
bool operator<(const UserScript& script1, const UserScript& script2) {
// The only kind of script that should be compared is the kind that has its
// IDs initialized to a meaningful value.
« no previous file with comments | « extensions/common/user_script.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698