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

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

Issue 3179017: FBTF: Remove "obviously" unneeded standard C++ library #includes. (Closed)
Patch Set: fixed mac oopsie Created 10 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 | « chrome/common/chrome_plugin_lib.h ('k') | chrome/common/extensions/extension_file_util.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_EXTENSION_EXTENT_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_EXTENT_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_EXTENT_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_EXTENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
10 #include <vector> 9 #include <vector>
11 10
12 #include "chrome/common/extensions/url_pattern.h" 11 #include "chrome/common/extensions/url_pattern.h"
13 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
14 13
15 // Represents the set of URLs an extension uses for web content. 14 // Represents the set of URLs an extension uses for web content.
16 class ExtensionExtent { 15 class ExtensionExtent {
17 public: 16 public:
18 typedef std::vector<URLPattern> PatternList; 17 typedef std::vector<URLPattern> PatternList;
19 18
20 bool is_empty() const { return patterns_.empty(); } 19 bool is_empty() const { return patterns_.empty(); }
21 20
22 const PatternList& patterns() const { return patterns_; } 21 const PatternList& patterns() const { return patterns_; }
23 void AddPattern(const URLPattern& pattern) { patterns_.push_back(pattern); } 22 void AddPattern(const URLPattern& pattern) { patterns_.push_back(pattern); }
24 void ClearPaths() { patterns_.clear(); } 23 void ClearPaths() { patterns_.clear(); }
25 24
26 // Test if the extent contains a URL. 25 // Test if the extent contains a URL.
27 bool ContainsURL(const GURL& url) const; 26 bool ContainsURL(const GURL& url) const;
28 27
29 // Returns true if there is a single URL that would be in two extents. 28 // Returns true if there is a single URL that would be in two extents.
30 bool OverlapsWith(const ExtensionExtent& other) const; 29 bool OverlapsWith(const ExtensionExtent& other) const;
31 30
32 private: 31 private:
33 // The list of URL patterns that comprise the extent. 32 // The list of URL patterns that comprise the extent.
34 PatternList patterns_; 33 PatternList patterns_;
35 }; 34 };
36 35
37 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_EXTENT_H_ 36 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_EXTENT_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_plugin_lib.h ('k') | chrome/common/extensions/extension_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698