| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 base::Time extension_installation_time, | 64 base::Time extension_installation_time, |
| 65 scoped_ptr<WebRequestConditionSet> conditions, | 65 scoped_ptr<WebRequestConditionSet> conditions, |
| 66 scoped_ptr<WebRequestActionSet> actions, | 66 scoped_ptr<WebRequestActionSet> actions, |
| 67 Priority priority); | 67 Priority priority); |
| 68 virtual ~WebRequestRule(); | 68 virtual ~WebRequestRule(); |
| 69 | 69 |
| 70 // If |error| is empty, the translation was successful and the returned | 70 // If |error| is empty, the translation was successful and the returned |
| 71 // rule is internally consistent. | 71 // rule is internally consistent. |
| 72 static scoped_ptr<WebRequestRule> Create( | 72 static scoped_ptr<WebRequestRule> Create( |
| 73 URLMatcherConditionFactory* url_matcher_condition_factory, | 73 URLMatcherConditionFactory* url_matcher_condition_factory, |
| 74 URLMatcherConditionFactory* first_party_url_matcher_condition_factory, |
| 74 const std::string& extension_id, | 75 const std::string& extension_id, |
| 75 base::Time extension_installation_time, | 76 base::Time extension_installation_time, |
| 76 linked_ptr<RulesRegistry::Rule> rule, | 77 linked_ptr<RulesRegistry::Rule> rule, |
| 77 std::string* error); | 78 std::string* error); |
| 78 | 79 |
| 79 const GlobalRuleId& id() const { return id_; } | 80 const GlobalRuleId& id() const { return id_; } |
| 80 const std::string& extension_id() const { return id_.first; } | 81 const std::string& extension_id() const { return id_.first; } |
| 81 const WebRequestConditionSet& conditions() const { return *conditions_; } | 82 const WebRequestConditionSet& conditions() const { return *conditions_; } |
| 82 const WebRequestActionSet& actions() const { return *actions_; } | 83 const WebRequestActionSet& actions() const { return *actions_; } |
| 83 Priority priority() const { return priority_; } | 84 Priority priority() const { return priority_; } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 113 scoped_ptr<WebRequestConditionSet> conditions_; | 114 scoped_ptr<WebRequestConditionSet> conditions_; |
| 114 scoped_ptr<WebRequestActionSet> actions_; | 115 scoped_ptr<WebRequestActionSet> actions_; |
| 115 Priority priority_; | 116 Priority priority_; |
| 116 | 117 |
| 117 DISALLOW_COPY_AND_ASSIGN(WebRequestRule); | 118 DISALLOW_COPY_AND_ASSIGN(WebRequestRule); |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 } // namespace extensions | 121 } // namespace extensions |
| 121 | 122 |
| 122 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_
H_ | 123 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULE_
H_ |
| OLD | NEW |