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 |