OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_internals/net_internals_ui.h" | 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 } | 675 } |
676 | 676 |
677 void NetInternalsMessageHandler::RegisterMessages() { | 677 void NetInternalsMessageHandler::RegisterMessages() { |
678 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 678 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
679 | 679 |
680 Profile* profile = Profile::FromWebUI(web_ui()); | 680 Profile* profile = Profile::FromWebUI(web_ui()); |
681 | 681 |
682 proxy_ = new IOThreadImpl(this->AsWeakPtr(), g_browser_process->io_thread(), | 682 proxy_ = new IOThreadImpl(this->AsWeakPtr(), g_browser_process->io_thread(), |
683 profile->GetRequestContext()); | 683 profile->GetRequestContext()); |
684 proxy_->AddRequestContextGetter(profile->GetMediaRequestContext()); | 684 proxy_->AddRequestContextGetter(profile->GetMediaRequestContext()); |
685 proxy_->AddRequestContextGetter(profile->GetRequestContextForExtensions()); | |
686 #if defined(OS_CHROMEOS) | 685 #if defined(OS_CHROMEOS) |
687 syslogs_getter_.reset(new SystemLogsGetter(this, | 686 syslogs_getter_.reset(new SystemLogsGetter(this, |
688 chromeos::system::SyslogsProvider::GetInstance())); | 687 chromeos::system::SyslogsProvider::GetInstance())); |
689 #endif | 688 #endif |
690 | 689 |
691 prerender::PrerenderManager* prerender_manager = | 690 prerender::PrerenderManager* prerender_manager = |
692 prerender::PrerenderManagerFactory::GetForProfile(profile); | 691 prerender::PrerenderManagerFactory::GetForProfile(profile); |
693 if (prerender_manager) { | 692 if (prerender_manager) { |
694 prerender_manager_ = prerender_manager->AsWeakPtr(); | 693 prerender_manager_ = prerender_manager->AsWeakPtr(); |
695 } else { | 694 } else { |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1870 } | 1869 } |
1871 | 1870 |
1872 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 1871 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
1873 : WebUIController(web_ui) { | 1872 : WebUIController(web_ui) { |
1874 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 1873 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
1875 | 1874 |
1876 // Set up the chrome://net-internals/ source. | 1875 // Set up the chrome://net-internals/ source. |
1877 Profile* profile = Profile::FromWebUI(web_ui); | 1876 Profile* profile = Profile::FromWebUI(web_ui); |
1878 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); | 1877 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); |
1879 } | 1878 } |
OLD | NEW |