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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 635623003: Cleanup: Better constify some strings in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac Created 6 years, 1 month 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
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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 return placeholder->plugin(); 933 return placeholder->plugin();
934 } 934 }
935 935
936 // For NaCl content handling plugins, the NaCl manifest is stored in an 936 // For NaCl content handling plugins, the NaCl manifest is stored in an
937 // additonal 'nacl' param associated with the MIME type. 937 // additonal 'nacl' param associated with the MIME type.
938 // static 938 // static
939 GURL ChromeContentRendererClient::GetNaClContentHandlerURL( 939 GURL ChromeContentRendererClient::GetNaClContentHandlerURL(
940 const std::string& actual_mime_type, 940 const std::string& actual_mime_type,
941 const content::WebPluginInfo& plugin) { 941 const content::WebPluginInfo& plugin) {
942 // Look for the manifest URL among the MIME type's additonal parameters. 942 // Look for the manifest URL among the MIME type's additonal parameters.
943 const char* kNaClPluginManifestAttribute = "nacl"; 943 const char kNaClPluginManifestAttribute[] = "nacl";
944 base::string16 nacl_attr = ASCIIToUTF16(kNaClPluginManifestAttribute); 944 base::string16 nacl_attr = ASCIIToUTF16(kNaClPluginManifestAttribute);
945 for (size_t i = 0; i < plugin.mime_types.size(); ++i) { 945 for (size_t i = 0; i < plugin.mime_types.size(); ++i) {
946 if (plugin.mime_types[i].mime_type == actual_mime_type) { 946 if (plugin.mime_types[i].mime_type == actual_mime_type) {
947 const content::WebPluginMimeType& content_type = plugin.mime_types[i]; 947 const content::WebPluginMimeType& content_type = plugin.mime_types[i];
948 for (size_t i = 0; i < content_type.additional_param_names.size(); ++i) { 948 for (size_t i = 0; i < content_type.additional_param_names.size(); ++i) {
949 if (content_type.additional_param_names[i] == nacl_attr) 949 if (content_type.additional_param_names[i] == nacl_attr)
950 return GURL(content_type.additional_param_values[i]); 950 return GURL(content_type.additional_param_values[i]);
951 } 951 }
952 break; 952 break;
953 } 953 }
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 content::BrowserPluginDelegate* 1571 content::BrowserPluginDelegate*
1572 ChromeContentRendererClient::CreateBrowserPluginDelegate( 1572 ChromeContentRendererClient::CreateBrowserPluginDelegate(
1573 content::RenderFrame* render_frame, 1573 content::RenderFrame* render_frame,
1574 const std::string& mime_type) { 1574 const std::string& mime_type) {
1575 #if defined(ENABLE_EXTENSIONS) 1575 #if defined(ENABLE_EXTENSIONS)
1576 return new extensions::GuestViewContainer(render_frame, mime_type); 1576 return new extensions::GuestViewContainer(render_frame, mime_type);
1577 #else 1577 #else
1578 return NULL; 1578 return NULL;
1579 #endif 1579 #endif
1580 } 1580 }
OLDNEW
« no previous file with comments | « chrome/installer/util/master_preferences_unittest.cc ('k') | chrome/renderer/extensions/app_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698