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

Side by Side Diff: extensions/browser/api/web_request/web_request_api.cc

Issue 2108623005: extensions: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « extensions/browser/api/serial/serial_apitest.cc ('k') | extensions/browser/event_router.cc » ('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) 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 #include "extensions/browser/api/web_request/web_request_api.h" 5 #include "extensions/browser/api/web_request/web_request_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 bool IsWebRequestEvent(const std::string& event_name) { 127 bool IsWebRequestEvent(const std::string& event_name) {
128 std::string web_request_event_name(event_name); 128 std::string web_request_event_name(event_name);
129 if (base::StartsWith(web_request_event_name, 129 if (base::StartsWith(web_request_event_name,
130 webview::kWebViewEventPrefix, 130 webview::kWebViewEventPrefix,
131 base::CompareCase::SENSITIVE)) { 131 base::CompareCase::SENSITIVE)) {
132 web_request_event_name.replace( 132 web_request_event_name.replace(
133 0, strlen(webview::kWebViewEventPrefix), kWebRequestEventPrefix); 133 0, strlen(webview::kWebViewEventPrefix), kWebRequestEventPrefix);
134 } 134 }
135 const auto web_request_events_end = 135 auto* const* web_request_events_end =
136 kWebRequestEvents + arraysize(kWebRequestEvents); 136 kWebRequestEvents + arraysize(kWebRequestEvents);
137 return std::find(kWebRequestEvents, web_request_events_end, 137 return std::find(kWebRequestEvents, web_request_events_end,
138 web_request_event_name) != web_request_events_end; 138 web_request_event_name) != web_request_events_end;
139 } 139 }
140 140
141 // Returns whether |request| has been triggered by an extension in 141 // Returns whether |request| has been triggered by an extension in
142 // |extension_info_map|. 142 // |extension_info_map|.
143 bool IsRequestFromExtension(const net::URLRequest* request, 143 bool IsRequestFromExtension(const net::URLRequest* request,
144 const InfoMap* extension_info_map) { 144 const InfoMap* extension_info_map) {
145 // |extension_info_map| is NULL for system-level requests. 145 // |extension_info_map| is NULL for system-level requests.
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 // Continue gracefully. 2265 // Continue gracefully.
2266 RunSync(); 2266 RunSync();
2267 } 2267 }
2268 2268
2269 bool WebRequestHandlerBehaviorChangedFunction::RunSync() { 2269 bool WebRequestHandlerBehaviorChangedFunction::RunSync() {
2270 helpers::ClearCacheOnNavigation(); 2270 helpers::ClearCacheOnNavigation();
2271 return true; 2271 return true;
2272 } 2272 }
2273 2273
2274 } // namespace extensions 2274 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/serial/serial_apitest.cc ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698