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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 389 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
390 | 390 |
391 URLRequestContextGetterList context_getters; | 391 URLRequestContextGetterList context_getters; |
392 | 392 |
393 Profile* profile = Profile::FromWebUI(web_ui()); | 393 Profile* profile = Profile::FromWebUI(web_ui()); |
394 | 394 |
395 context_getters.push_back(profile->GetRequestContext()); | 395 context_getters.push_back(profile->GetRequestContext()); |
396 context_getters.push_back( | 396 context_getters.push_back( |
397 content::BrowserContext::GetDefaultStoragePartition(profile) | 397 content::BrowserContext::GetDefaultStoragePartition(profile) |
398 ->GetMediaURLRequestContext()); | 398 ->GetMediaURLRequestContext()); |
399 #if BUILDFLAG(ENABLE_EXTENSIONS) | |
400 context_getters.push_back(profile->GetRequestContextForExtensions()); | |
401 #endif | |
402 context_getters.push_back( | 399 context_getters.push_back( |
403 g_browser_process->io_thread()->system_url_request_context_getter()); | 400 g_browser_process->io_thread()->system_url_request_context_getter()); |
404 context_getters.push_back( | 401 context_getters.push_back( |
405 new ProxyScriptFetcherContextGetter(g_browser_process->io_thread())); | 402 new ProxyScriptFetcherContextGetter(g_browser_process->io_thread())); |
406 | 403 |
407 return context_getters; | 404 return context_getters; |
408 } | 405 } |
409 | 406 |
410 } // namespace | 407 } // namespace |
411 | 408 |
412 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 409 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
413 web_ui->AddMessageHandler(base::MakeUnique<NetExportMessageHandler>()); | 410 web_ui->AddMessageHandler(base::MakeUnique<NetExportMessageHandler>()); |
414 | 411 |
415 // Set up the chrome://net-export/ source. | 412 // Set up the chrome://net-export/ source. |
416 Profile* profile = Profile::FromWebUI(web_ui); | 413 Profile* profile = Profile::FromWebUI(web_ui); |
417 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); | 414 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); |
418 } | 415 } |
OLD | NEW |