Chromium Code Reviews
Help | Chromium Project | Sign in
(411)

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

Issue 3057027: Convert wstring/wchar_t* in chrome/renderer to std::string/char* or string16. (Closed)
Patch Set: fix 2 Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/extensions/extension_api_json_validity_unittest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/blocked_plugin.h" 5 #include "chrome/renderer/blocked_plugin.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 30 matching lines...) Expand all
41 web_view->mainFrame()->setCanHaveScrollbars(false); 41 web_view->mainFrame()->setCanHaveScrollbars(false);
42 42
43 int resource_id = IDR_BLOCKED_PLUGIN_HTML; 43 int resource_id = IDR_BLOCKED_PLUGIN_HTML;
44 const base::StringPiece template_html( 44 const base::StringPiece template_html(
45 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); 45 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id));
46 46
47 DCHECK(!template_html.empty()) << "unable to load template. ID: " 47 DCHECK(!template_html.empty()) << "unable to load template. ID: "
48 << resource_id; 48 << resource_id;
49 49
50 DictionaryValue localized_strings; 50 DictionaryValue localized_strings;
51 localized_strings.SetString(L"loadPlugin", 51 localized_strings.SetString("loadPlugin",
52 l10n_util::GetString(IDS_PLUGIN_LOAD)); 52 l10n_util::GetStringUTF8(IDS_PLUGIN_LOAD));
53 53
54 // "t" is the id of the templates root node. 54 // "t" is the id of the templates root node.
55 std::string htmlData = jstemplate_builder::GetTemplatesHtml( 55 std::string htmlData = jstemplate_builder::GetTemplatesHtml(
56 template_html, &localized_strings, "t"); 56 template_html, &localized_strings, "t");
57 57
58 web_view->mainFrame()->loadHTMLString(htmlData, 58 web_view->mainFrame()->loadHTMLString(htmlData,
59 GURL(kBlockedPluginDataURL)); 59 GURL(kBlockedPluginDataURL));
60 } 60 }
61 61
62 void BlockedPlugin::BindWebFrame(WebFrame* frame) { 62 void BlockedPlugin::BindWebFrame(WebFrame* frame) {
(...skipping 17 matching lines...) Expand all
80 plugin_params_, 80 plugin_params_,
81 std::string(), 81 std::string(),
82 FilePath()); 82 FilePath());
83 if (new_plugin && new_plugin->initialize(container)) { 83 if (new_plugin && new_plugin->initialize(container)) {
84 container->setPlugin(new_plugin); 84 container->setPlugin(new_plugin);
85 container->invalidate(); 85 container->invalidate();
86 container->reportGeometry(); 86 container->reportGeometry();
87 plugin_->destroy(); 87 plugin_->destroy();
88 } 88 }
89 } 89 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/extension_api_json_validity_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be