| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 return; | 321 return; |
| 322 | 322 |
| 323 // (The |profile| parameter is relevant for Chrome OS) | 323 // (The |profile| parameter is relevant for Chrome OS) |
| 324 Profile* profile = Profile::FromWebUI(web_ui()); | 324 Profile* profile = Profile::FromWebUI(web_ui()); |
| 325 | 325 |
| 326 platform_util::ShowItemInFolder(profile, path); | 326 platform_util::ShowItemInFolder(profile, path); |
| 327 } | 327 } |
| 328 | 328 |
| 329 // static | 329 // static |
| 330 bool NetExportMessageHandler::UsingMobileUI() { | 330 bool NetExportMessageHandler::UsingMobileUI() { |
| 331 #if defined(OS_ANDROID) || defined(OS_IOS) | 331 #if defined(OS_ANDROID) |
| 332 return true; | 332 return true; |
| 333 #else | 333 #else |
| 334 return false; | 334 return false; |
| 335 #endif | 335 #endif |
| 336 } | 336 } |
| 337 | 337 |
| 338 void NetExportMessageHandler::NotifyUIWithState( | 338 void NetExportMessageHandler::NotifyUIWithState( |
| 339 std::unique_ptr<base::DictionaryValue> state) { | 339 std::unique_ptr<base::DictionaryValue> state) { |
| 340 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 340 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 341 DCHECK(web_ui()); | 341 DCHECK(web_ui()); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 } // namespace | 383 } // namespace |
| 384 | 384 |
| 385 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 385 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 386 web_ui->AddMessageHandler(base::MakeUnique<NetExportMessageHandler>()); | 386 web_ui->AddMessageHandler(base::MakeUnique<NetExportMessageHandler>()); |
| 387 | 387 |
| 388 // Set up the chrome://net-export/ source. | 388 // Set up the chrome://net-export/ source. |
| 389 Profile* profile = Profile::FromWebUI(web_ui); | 389 Profile* profile = Profile::FromWebUI(web_ui); |
| 390 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); | 390 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); |
| 391 } | 391 } |
| OLD | NEW |