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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 2321083002: [NoStatePrefetch] Add performance histograms. (Closed)
Patch Set: rename url_ to start_url_ Created 4 years, 3 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) 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 proxy_ = new IOThreadImpl(this->AsWeakPtr(), g_browser_process->io_thread(), 404 proxy_ = new IOThreadImpl(this->AsWeakPtr(), g_browser_process->io_thread(),
405 profile->GetRequestContext()); 405 profile->GetRequestContext());
406 proxy_->AddRequestContextGetter( 406 proxy_->AddRequestContextGetter(
407 content::BrowserContext::GetDefaultStoragePartition(profile)-> 407 content::BrowserContext::GetDefaultStoragePartition(profile)->
408 GetMediaURLRequestContext()); 408 GetMediaURLRequestContext());
409 #if defined(ENABLE_EXTENSIONS) 409 #if defined(ENABLE_EXTENSIONS)
410 proxy_->AddRequestContextGetter(profile->GetRequestContextForExtensions()); 410 proxy_->AddRequestContextGetter(profile->GetRequestContextForExtensions());
411 #endif 411 #endif
412 412
413 prerender::PrerenderManager* prerender_manager = 413 prerender::PrerenderManager* prerender_manager =
414 prerender::PrerenderManagerFactory::GetForProfile(profile); 414 prerender::PrerenderManagerFactory::GetForBrowserContext(profile);
415 if (prerender_manager) { 415 if (prerender_manager) {
416 prerender_manager_ = prerender_manager->AsWeakPtr(); 416 prerender_manager_ = prerender_manager->AsWeakPtr();
417 } else { 417 } else {
418 prerender_manager_ = base::WeakPtr<prerender::PrerenderManager>(); 418 prerender_manager_ = base::WeakPtr<prerender::PrerenderManager>();
419 } 419 }
420 420
421 web_ui()->RegisterMessageCallback( 421 web_ui()->RegisterMessageCallback(
422 "notifyReady", 422 "notifyReady",
423 base::Bind(&NetInternalsMessageHandler::OnRendererReady, 423 base::Bind(&NetInternalsMessageHandler::OnRendererReady,
424 base::Unretained(this))); 424 base::Unretained(this)));
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 //////////////////////////////////////////////////////////////////////////////// 1175 ////////////////////////////////////////////////////////////////////////////////
1176 1176
1177 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1177 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1178 : WebUIController(web_ui) { 1178 : WebUIController(web_ui) {
1179 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1179 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1180 1180
1181 // Set up the chrome://net-internals/ source. 1181 // Set up the chrome://net-internals/ source.
1182 Profile* profile = Profile::FromWebUI(web_ui); 1182 Profile* profile = Profile::FromWebUI(web_ui);
1183 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1183 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1184 } 1184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698