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

Side by Side Diff: chrome/browser/ui/webui/net_export_ui.cc

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/ui/webui/net_export_ui.h" 5 #include "chrome/browser/ui/webui/net_export_ui.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 chrome::android::SendEmail( 237 chrome::android::SendEmail(
238 base::UTF8ToUTF16(email), base::UTF8ToUTF16(subject), 238 base::UTF8ToUTF16(email), base::UTF8ToUTF16(subject),
239 base::UTF8ToUTF16(body), base::UTF8ToUTF16(title), 239 base::UTF8ToUTF16(body), base::UTF8ToUTF16(title),
240 base::UTF8ToUTF16(file_to_attach)); 240 base::UTF8ToUTF16(file_to_attach));
241 #endif 241 #endif
242 } 242 }
243 243
244 void NetExportMessageHandler::OnExportNetLogInfoChanged(base::Value* arg) { 244 void NetExportMessageHandler::OnExportNetLogInfoChanged(base::Value* arg) {
245 std::unique_ptr<base::Value> value(arg); 245 std::unique_ptr<base::Value> value(arg);
246 DCHECK_CURRENTLY_ON(BrowserThread::UI); 246 DCHECK_CURRENTLY_ON(BrowserThread::UI);
247 web_ui()->CallJavascriptFunction(net_log::kOnExportNetLogInfoChanged, *arg); 247 web_ui()->CallJavascriptFunctionUnsafe(net_log::kOnExportNetLogInfoChanged,
248 *arg);
248 } 249 }
249 250
250 } // namespace 251 } // namespace
251 252
252 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { 253 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) {
253 web_ui->AddMessageHandler(new NetExportMessageHandler()); 254 web_ui->AddMessageHandler(new NetExportMessageHandler());
254 255
255 // Set up the chrome://net-export/ source. 256 // Set up the chrome://net-export/ source.
256 Profile* profile = Profile::FromWebUI(web_ui); 257 Profile* profile = Profile::FromWebUI(web_ui);
257 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); 258 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource());
258 } 259 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/nacl_ui.cc ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698