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

Side by Side Diff: extensions/common/user_script.cc

Issue 982113002: Fix a bug in UserScriptLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/pickle.h" 9 #include "base/pickle.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 relative_path_(relative_path), 74 relative_path_(relative_path),
75 url_(url) { 75 url_(url) {
76 } 76 }
77 77
78 UserScript::File::File() {} 78 UserScript::File::File() {}
79 79
80 UserScript::File::~File() {} 80 UserScript::File::~File() {}
81 81
82 UserScript::UserScript() 82 UserScript::UserScript()
83 : run_location_(DOCUMENT_IDLE), 83 : run_location_(DOCUMENT_IDLE),
84 host_id_(HostID()),
Devlin 2015/03/05 20:18:38 Default constructors are automatically called; you
Xi Han 2015/03/05 20:26:24 Remove initializations for both host_id and routin
84 consumer_instance_type_(TAB), 85 consumer_instance_type_(TAB),
86 routing_info_(RoutingInfo()),
85 user_script_id_(-1), 87 user_script_id_(-1),
86 emulate_greasemonkey_(false), 88 emulate_greasemonkey_(false),
87 match_all_frames_(false), 89 match_all_frames_(false),
88 match_about_blank_(false), 90 match_about_blank_(false),
89 incognito_enabled_(false) {} 91 incognito_enabled_(false) {}
90 92
91 UserScript::~UserScript() { 93 UserScript::~UserScript() {
92 } 94 }
93 95
94 void UserScript::add_url_pattern(const URLPattern& pattern) { 96 void UserScript::add_url_pattern(const URLPattern& pattern) {
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 292 }
291 293
292 bool operator<(const UserScript& script1, const UserScript& script2) { 294 bool operator<(const UserScript& script1, const UserScript& script2) {
293 // The only kind of script that should be compared is the kind that has its 295 // The only kind of script that should be compared is the kind that has its
294 // IDs initialized to a meaningful value. 296 // IDs initialized to a meaningful value.
295 DCHECK(script1.id() != -1 && script2.id() != -1); 297 DCHECK(script1.id() != -1 && script2.id() != -1);
296 return script1.id() < script2.id(); 298 return script1.id() < script2.id();
297 } 299 }
298 300
299 } // namespace extensions 301 } // namespace extensions
OLDNEW
« extensions/browser/user_script_loader.cc ('K') | « extensions/common/user_script.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698