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

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 424463003: Basic Mojo message header validation for JavaScript. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make claimRange() consistent with isValidRange() Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/content_resources.grd ('k') | mojo/public/js/bindings/codec.js » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer/dispatcher.h" 5 #include "extensions/renderer/dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 resources.push_back( 488 resources.push_back(
489 std::make_pair(mojo::kCodecModuleName, IDR_MOJO_CODEC_JS)); 489 std::make_pair(mojo::kCodecModuleName, IDR_MOJO_CODEC_JS));
490 resources.push_back( 490 resources.push_back(
491 std::make_pair(mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS)); 491 std::make_pair(mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS));
492 resources.push_back( 492 resources.push_back(
493 std::make_pair(mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS)); 493 std::make_pair(mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS));
494 resources.push_back( 494 resources.push_back(
495 std::make_pair(mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS)); 495 std::make_pair(mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS));
496 resources.push_back( 496 resources.push_back(
497 std::make_pair(mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS)); 497 std::make_pair(mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS));
498 resources.push_back(
499 std::make_pair(mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS));
498 500
499 // Custom bindings. 501 // Custom bindings.
500 resources.push_back( 502 resources.push_back(
501 std::make_pair("app.runtime", IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS)); 503 std::make_pair("app.runtime", IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS));
502 resources.push_back( 504 resources.push_back(
503 std::make_pair("contextMenus", IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS)); 505 std::make_pair("contextMenus", IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS));
504 resources.push_back( 506 resources.push_back(
505 std::make_pair("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS)); 507 std::make_pair("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS));
506 resources.push_back(std::make_pair("i18n", IDR_I18N_CUSTOM_BINDINGS_JS)); 508 resources.push_back(std::make_pair("i18n", IDR_I18N_CUSTOM_BINDINGS_JS));
507 resources.push_back( 509 resources.push_back(
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 return v8::Handle<v8::Object>(); 1286 return v8::Handle<v8::Object>();
1285 1287
1286 if (bind_name) 1288 if (bind_name)
1287 *bind_name = split.back(); 1289 *bind_name = split.back();
1288 1290
1289 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) 1291 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context))
1290 : bind_object; 1292 : bind_object;
1291 } 1293 }
1292 1294
1293 } // namespace extensions 1295 } // namespace extensions
OLDNEW
« no previous file with comments | « content/content_resources.grd ('k') | mojo/public/js/bindings/codec.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698