OLD | NEW |
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 Loading... |
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 consumer_instance_type_(TAB), |
84 user_script_id_(-1), | 85 user_script_id_(-1), |
85 emulate_greasemonkey_(false), | 86 emulate_greasemonkey_(false), |
86 match_all_frames_(false), | 87 match_all_frames_(false), |
87 match_about_blank_(false), | 88 match_about_blank_(false), |
88 incognito_enabled_(false) {} | 89 incognito_enabled_(false) {} |
89 | 90 |
90 UserScript::~UserScript() { | 91 UserScript::~UserScript() { |
91 } | 92 } |
92 | 93 |
93 void UserScript::add_url_pattern(const URLPattern& pattern) { | 94 void UserScript::add_url_pattern(const URLPattern& pattern) { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 290 } |
290 | 291 |
291 bool operator<(const UserScript& script1, const UserScript& script2) { | 292 bool operator<(const UserScript& script1, const UserScript& script2) { |
292 // The only kind of script that should be compared is the kind that has its | 293 // The only kind of script that should be compared is the kind that has its |
293 // IDs initialized to a meaningful value. | 294 // IDs initialized to a meaningful value. |
294 DCHECK(script1.id() != -1 && script2.id() != -1); | 295 DCHECK(script1.id() != -1 && script2.id() != -1); |
295 return script1.id() < script2.id(); | 296 return script1.id() < script2.id(); |
296 } | 297 } |
297 | 298 |
298 } // namespace extensions | 299 } // namespace extensions |
OLD | NEW |