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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 <string> 8 #include <string>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/common/features.h" 17 #include "chrome/common/features.h"
18 #include "chrome/common/url_constants.h" 18 #include "chrome/common/url_constants.h"
19 #include "components/grit/components_resources.h" 19 #include "components/grit/components_resources.h"
20 #include "components/net_log/chrome_net_log.h" 20 #include "components/net_log/chrome_net_log.h"
21 #include "components/net_log/net_export_ui_constants.h" 21 #include "components/net_log/net_export_ui_constants.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 "Please add some informative text about the network issues."; 235 "Please add some informative text about the network issues.";
236 base::FilePath::StringType file_to_attach(file_to_send.value()); 236 base::FilePath::StringType file_to_attach(file_to_send.value());
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 scoped_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()->CallJavascriptFunction(net_log::kOnExportNetLogInfoChanged, *arg);
248 } 248 }
249 249
250 } // namespace 250 } // namespace
251 251
252 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { 252 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) {
253 web_ui->AddMessageHandler(new NetExportMessageHandler()); 253 web_ui->AddMessageHandler(new NetExportMessageHandler());
254 254
255 // Set up the chrome://net-export/ source. 255 // Set up the chrome://net-export/ source.
256 Profile* profile = Profile::FromWebUI(web_ui); 256 Profile* profile = Profile::FromWebUI(web_ui);
257 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); 257 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource());
258 } 258 }
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