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

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

Issue 3033050: Rename DictionaryValue's SetStringFromUTF16() to SetString() (and overload). (Closed)
Patch Set: There shouldn't be wstrings in platform-ind. code. Created 10 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
« no previous file with comments | « chrome/common/plugin_group.cc ('k') | chrome/renderer/localized_error.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 web_view->mainFrame()->setCanHaveScrollbars(false); 42 web_view->mainFrame()->setCanHaveScrollbars(false);
43 43
44 int resource_id = IDR_BLOCKED_PLUGIN_HTML; 44 int resource_id = IDR_BLOCKED_PLUGIN_HTML;
45 const base::StringPiece template_html( 45 const base::StringPiece template_html(
46 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); 46 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id));
47 47
48 DCHECK(!template_html.empty()) << "unable to load template. ID: " 48 DCHECK(!template_html.empty()) << "unable to load template. ID: "
49 << resource_id; 49 << resource_id;
50 50
51 DictionaryValue localized_strings; 51 DictionaryValue localized_strings;
52 localized_strings.SetStringFromUTF16("loadPlugin", 52 localized_strings.SetString("loadPlugin",
53 l10n_util::GetStringUTF16(IDS_PLUGIN_LOAD)); 53 l10n_util::GetStringUTF16(IDS_PLUGIN_LOAD));
54 54
55 // "t" is the id of the templates root node. 55 // "t" is the id of the templates root node.
56 std::string htmlData = jstemplate_builder::GetTemplatesHtml( 56 std::string htmlData = jstemplate_builder::GetTemplatesHtml(
57 template_html, &localized_strings, "t"); 57 template_html, &localized_strings, "t");
58 58
59 web_view->mainFrame()->loadHTMLString(htmlData, 59 web_view->mainFrame()->loadHTMLString(htmlData,
60 GURL(kBlockedPluginDataURL)); 60 GURL(kBlockedPluginDataURL));
61 61
62 registrar_.Add(this, 62 registrar_.Add(this,
63 NotificationType::SHOULD_LOAD_PLUGINS, 63 NotificationType::SHOULD_LOAD_PLUGINS,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 NULL, 96 NULL,
97 std::string()); 97 std::string());
98 if (new_plugin && new_plugin->initialize(container)) { 98 if (new_plugin && new_plugin->initialize(container)) {
99 container->setPlugin(new_plugin); 99 container->setPlugin(new_plugin);
100 plugin_->ReplayReceivedData(new_plugin); 100 plugin_->ReplayReceivedData(new_plugin);
101 container->invalidate(); 101 container->invalidate();
102 container->reportGeometry(); 102 container->reportGeometry();
103 plugin_->destroy(); 103 plugin_->destroy();
104 } 104 }
105 } 105 }
OLDNEW
« no previous file with comments | « chrome/common/plugin_group.cc ('k') | chrome/renderer/localized_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698