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

Unified Diff: extensions/common/user_script.cc

Issue 420543002: Declarative content scripts: Browser-side: per-extension shared memory regions (lazily loaded) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit and rebase from master Created 6 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') | extensions/shell/browser/shell_extension_system.h » ('j') | 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 128ac55b5a52c4afc6ad20b9779aa265ff567078..2e705ce86fc6e8dff6a9cfc4db541b9037fa72a0 100644
--- a/extensions/common/user_script.cc
+++ b/extensions/common/user_script.cc
@@ -240,4 +240,11 @@ void UserScript::UnpickleScripts(const ::Pickle& pickle, PickleIterator* iter,
}
}
+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.
+ DCHECK(script1.id() != -1 && script2.id() != -1);
+ return script1.id() < script2.id();
+}
+
} // namespace extensions
« no previous file with comments | « extensions/common/user_script.h ('k') | extensions/shell/browser/shell_extension_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698