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

Side by Side Diff: chrome/common/extensions/user_script.h

Issue 7347011: Update URLPatternSet to contain a std::set instead of std::vector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile errors. Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_
6 #define CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ 6 #define CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const std::vector<std::string>& exclude_globs() const { 142 const std::vector<std::string>& exclude_globs() const {
143 return exclude_globs_; 143 return exclude_globs_;
144 } 144 }
145 void add_exclude_glob(const std::string& glob) { 145 void add_exclude_glob(const std::string& glob) {
146 exclude_globs_.push_back(glob); 146 exclude_globs_.push_back(glob);
147 } 147 }
148 void clear_exclude_globs() { exclude_globs_.clear(); } 148 void clear_exclude_globs() { exclude_globs_.clear(); }
149 149
150 // The URLPatterns, if any, that determine which pages this script runs 150 // The URLPatterns, if any, that determine which pages this script runs
151 // against. 151 // against.
152 const URLPatternList& url_patterns() const { return url_set_.patterns(); } 152 const URLPatternSet& url_patterns() const { return url_set_; }
153 void add_url_pattern(const URLPattern& pattern); 153 void add_url_pattern(const URLPattern& pattern);
154 const URLPatternList& exclude_url_patterns() const { 154 const URLPatternSet& exclude_url_patterns() const {
155 return exclude_url_set_.patterns(); } 155 return exclude_url_set_;
156 }
156 void add_exclude_url_pattern(const URLPattern& pattern); 157 void add_exclude_url_pattern(const URLPattern& pattern);
157 158
158 // List of js scripts for this user script 159 // List of js scripts for this user script
159 FileList& js_scripts() { return js_scripts_; } 160 FileList& js_scripts() { return js_scripts_; }
160 const FileList& js_scripts() const { return js_scripts_; } 161 const FileList& js_scripts() const { return js_scripts_; }
161 162
162 // List of css scripts for this user script 163 // List of css scripts for this user script
163 FileList& css_scripts() { return css_scripts_; } 164 FileList& css_scripts() { return css_scripts_; }
164 const FileList& css_scripts() const { return css_scripts_; } 165 const FileList& css_scripts() const { return css_scripts_; }
165 166
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Defaults to false. 231 // Defaults to false.
231 bool match_all_frames_; 232 bool match_all_frames_;
232 233
233 // True if the script should be injected into an incognito tab. 234 // True if the script should be injected into an incognito tab.
234 bool incognito_enabled_; 235 bool incognito_enabled_;
235 }; 236 };
236 237
237 typedef std::vector<UserScript> UserScriptList; 238 typedef std::vector<UserScript> UserScriptList;
238 239
239 #endif // CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ 240 #endif // CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/url_pattern_unittest.cc ('k') | chrome/common/extensions/user_script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698