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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "extensions/common/user_script.h" 5 #include "extensions/common/user_script.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/pickle.h" 8 #include "base/pickle.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "extensions/common/switches.h" 10 #include "extensions/common/switches.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 uint64 num_files = 0; 233 uint64 num_files = 0;
234 CHECK(pickle.ReadUInt64(iter, &num_files)); 234 CHECK(pickle.ReadUInt64(iter, &num_files));
235 scripts->clear(); 235 scripts->clear();
236 for (uint64 i = 0; i < num_files; ++i) { 236 for (uint64 i = 0; i < num_files; ++i) {
237 File file; 237 File file;
238 file.Unpickle(pickle, iter); 238 file.Unpickle(pickle, iter);
239 scripts->push_back(file); 239 scripts->push_back(file);
240 } 240 }
241 } 241 }
242 242
243 bool operator<(const UserScript& script1, const UserScript& script2) {
244 // The only kind of script that should be compared is the kind that has its
245 // IDs initialized to a meaningful value.
246 DCHECK(script1.id() != -1 && script2.id() != -1);
247 return script1.id() < script2.id();
248 }
249
243 } // namespace extensions 250 } // namespace extensions
OLDNEW
« 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