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

Side by Side Diff: ios/web/webui/crw_web_ui_manager.mm

Issue 2796253002: Associated Message Validation (Closed)
Patch Set: Validate payloadInterfaceIds before getting it. Use [0] for dimensions for validateArrayPointer. Ca… Created 3 years, 8 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 | « ios/web/ios_web_resources.grd ('k') | mojo/edk/js/tests/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #import "ios/web/webui/crw_web_ui_manager.h" 5 #import "ios/web/webui/crw_web_ui_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/json/string_escape.h" 10 #include "base/json/string_escape.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 return NO; 205 return NO;
206 } 206 }
207 std::string loadID; 207 std::string loadID;
208 if (!arguments->GetString(1, &loadID)) { 208 if (!arguments->GetString(1, &loadID)) {
209 DLOG(WARNING) << "JS message parameter not found: Load ID"; 209 DLOG(WARNING) << "JS message parameter not found: Load ID";
210 return NO; 210 return NO;
211 } 211 }
212 212
213 // Look for built-in scripts first. 213 // Look for built-in scripts first.
214 std::map<std::string, int> resource_map{ 214 std::map<std::string, int> resource_map{
215 {mojo::kAssociatedBindingsModuleName, IDR_MOJO_ASSOCIATED_BINDINGS_JS},
215 {mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS}, 216 {mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS},
216 {mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS}, 217 {mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS},
217 {mojo::kCodecModuleName, IDR_MOJO_CODEC_JS}, 218 {mojo::kCodecModuleName, IDR_MOJO_CODEC_JS},
218 {mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS}, 219 {mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS},
219 {mojo::kControlMessageHandlerModuleName, 220 {mojo::kControlMessageHandlerModuleName,
220 IDR_MOJO_CONTROL_MESSAGE_HANDLER_JS}, 221 IDR_MOJO_CONTROL_MESSAGE_HANDLER_JS},
221 {mojo::kControlMessageProxyModuleName, IDR_MOJO_CONTROL_MESSAGE_PROXY_JS}, 222 {mojo::kControlMessageProxyModuleName, IDR_MOJO_CONTROL_MESSAGE_PROXY_JS},
222 {mojo::kInterfaceControlMessagesMojom, 223 {mojo::kInterfaceControlMessagesMojom,
223 IDR_MOJO_INTERFACE_CONTROL_MESSAGES_MOJOM_JS}, 224 IDR_MOJO_INTERFACE_CONTROL_MESSAGES_MOJOM_JS},
224 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS}, 225 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS},
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 #pragma mark - Testing-Only Methods 318 #pragma mark - Testing-Only Methods
318 319
319 - (std::unique_ptr<web::URLFetcherBlockAdapter>) 320 - (std::unique_ptr<web::URLFetcherBlockAdapter>)
320 fetcherForURL:(const GURL&)URL 321 fetcherForURL:(const GURL&)URL
321 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { 322 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler {
322 return base::MakeUnique<web::URLFetcherBlockAdapter>( 323 return base::MakeUnique<web::URLFetcherBlockAdapter>(
323 URL, _webState->GetBrowserState()->GetRequestContext(), handler); 324 URL, _webState->GetBrowserState()->GetRequestContext(), handler);
324 } 325 }
325 326
326 @end 327 @end
OLDNEW
« no previous file with comments | « ios/web/ios_web_resources.grd ('k') | mojo/edk/js/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698