| OLD | NEW |
| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 base::UTF8ToUTF16(email), base::UTF8ToUTF16(subject), | 314 base::UTF8ToUTF16(email), base::UTF8ToUTF16(subject), |
| 315 base::UTF8ToUTF16(body), base::UTF8ToUTF16(title), | 315 base::UTF8ToUTF16(body), base::UTF8ToUTF16(title), |
| 316 base::UTF8ToUTF16(file_to_attach)); | 316 base::UTF8ToUTF16(file_to_attach)); |
| 317 #endif | 317 #endif |
| 318 } | 318 } |
| 319 | 319 |
| 320 void NetExportMessageHandler::StartNetLog(const base::FilePath& path) { | 320 void NetExportMessageHandler::StartNetLog(const base::FilePath& path) { |
| 321 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 321 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 322 | 322 |
| 323 file_writer_->StartNetLog( | 323 file_writer_->StartNetLog( |
| 324 base::FilePath(), capture_mode_, | 324 path, capture_mode_, |
| 325 base::CommandLine::ForCurrentProcess()->GetCommandLineString(), | 325 base::CommandLine::ForCurrentProcess()->GetCommandLineString(), |
| 326 chrome::GetChannelString(), GetURLRequestContexts()); | 326 chrome::GetChannelString(), GetURLRequestContexts()); |
| 327 } | 327 } |
| 328 | 328 |
| 329 void NetExportMessageHandler::ShowFileInShell(const base::FilePath& path) { | 329 void NetExportMessageHandler::ShowFileInShell(const base::FilePath& path) { |
| 330 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 330 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 331 if (path.empty()) | 331 if (path.empty()) |
| 332 return; | 332 return; |
| 333 | 333 |
| 334 // (The |profile| parameter is relevant for Chrome OS) | 334 // (The |profile| parameter is relevant for Chrome OS) |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 | 393 |
| 394 } // namespace | 394 } // namespace |
| 395 | 395 |
| 396 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 396 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 397 web_ui->AddMessageHandler(base::MakeUnique<NetExportMessageHandler>()); | 397 web_ui->AddMessageHandler(base::MakeUnique<NetExportMessageHandler>()); |
| 398 | 398 |
| 399 // Set up the chrome://net-export/ source. | 399 // Set up the chrome://net-export/ source. |
| 400 Profile* profile = Profile::FromWebUI(web_ui); | 400 Profile* profile = Profile::FromWebUI(web_ui); |
| 401 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); | 401 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); |
| 402 } | 402 } |
| OLD | NEW |