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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10736066: Adding histograms showing fraction of page load times (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/net/cache_stats.h » ('j') | chrome/browser/net/cache_stats.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 22 matching lines...) Expand all
33 #include "chrome/browser/extensions/extension_process_manager.h" 33 #include "chrome/browser/extensions/extension_process_manager.h"
34 #include "chrome/browser/extensions/extension_service.h" 34 #include "chrome/browser/extensions/extension_service.h"
35 #include "chrome/browser/extensions/extension_system.h" 35 #include "chrome/browser/extensions/extension_system.h"
36 #include "chrome/browser/extensions/extension_web_ui.h" 36 #include "chrome/browser/extensions/extension_web_ui.h"
37 #include "chrome/browser/extensions/extension_webkit_preferences.h" 37 #include "chrome/browser/extensions/extension_webkit_preferences.h"
38 #include "chrome/browser/geolocation/chrome_access_token_store.h" 38 #include "chrome/browser/geolocation/chrome_access_token_store.h"
39 #include "chrome/browser/google/google_util.h" 39 #include "chrome/browser/google/google_util.h"
40 #include "chrome/browser/gpu_util.h" 40 #include "chrome/browser/gpu_util.h"
41 #include "chrome/browser/infobars/infobar_tab_helper.h" 41 #include "chrome/browser/infobars/infobar_tab_helper.h"
42 #include "chrome/browser/media/media_internals.h" 42 #include "chrome/browser/media/media_internals.h"
43 #include "chrome/browser/net/cache_stats.h"
43 #include "chrome/browser/net/chrome_net_log.h" 44 #include "chrome/browser/net/chrome_net_log.h"
44 #include "chrome/browser/notifications/desktop_notification_service.h" 45 #include "chrome/browser/notifications/desktop_notification_service.h"
45 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 46 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
46 #include "chrome/browser/pepper_gtalk_message_filter.h" 47 #include "chrome/browser/pepper_gtalk_message_filter.h"
47 #include "chrome/browser/platform_util.h" 48 #include "chrome/browser/platform_util.h"
48 #include "chrome/browser/prefs/pref_service.h" 49 #include "chrome/browser/prefs/pref_service.h"
49 #include "chrome/browser/prefs/scoped_user_pref_update.h" 50 #include "chrome/browser/prefs/scoped_user_pref_update.h"
50 #include "chrome/browser/prerender/prerender_manager.h" 51 #include "chrome/browser/prerender/prerender_manager.h"
51 #include "chrome/browser/prerender/prerender_manager_factory.h" 52 #include "chrome/browser/prerender/prerender_manager_factory.h"
52 #include "chrome/browser/prerender/prerender_message_filter.h" 53 #include "chrome/browser/prerender/prerender_message_filter.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 void ChromeContentBrowserClient::RenderViewHostCreated( 414 void ChromeContentBrowserClient::RenderViewHostCreated(
414 RenderViewHost* render_view_host) { 415 RenderViewHost* render_view_host) {
415 416
416 SiteInstance* site_instance = render_view_host->GetSiteInstance(); 417 SiteInstance* site_instance = render_view_host->GetSiteInstance();
417 Profile* profile = Profile::FromBrowserContext( 418 Profile* profile = Profile::FromBrowserContext(
418 site_instance->GetBrowserContext()); 419 site_instance->GetBrowserContext());
419 420
420 new ChromeRenderViewHostObserver(render_view_host, 421 new ChromeRenderViewHostObserver(render_view_host,
421 profile->GetNetworkPredictor()); 422 profile->GetNetworkPredictor());
422 new ExtensionMessageHandler(render_view_host); 423 new ExtensionMessageHandler(render_view_host);
424 new chrome_browser_net::CacheStatsRenderViewHostObserver(render_view_host);
mmenke 2012/07/20 18:37:44 Is this called for all RenderViews? How about dev
tburkard 2012/07/20 19:36:42 Yes. On 2012/07/20 18:37:44, Matt Menke wrote:
423 } 425 }
424 426
425 void ChromeContentBrowserClient::RenderProcessHostCreated( 427 void ChromeContentBrowserClient::RenderProcessHostCreated(
426 content::RenderProcessHost* host) { 428 content::RenderProcessHost* host) {
427 int id = host->GetID(); 429 int id = host->GetID();
428 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 430 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
429 host->GetChannel()->AddFilter(new ChromeRenderMessageFilter( 431 host->GetChannel()->AddFilter(new ChromeRenderMessageFilter(
430 id, profile, profile->GetRequestContextForRenderProcess(id))); 432 id, profile, profile->GetRequestContextForRenderProcess(id)));
431 host->GetChannel()->AddFilter(new PluginInfoMessageFilter(id, profile)); 433 host->GetChannel()->AddFilter(new PluginInfoMessageFilter(id, profile));
432 #if defined(ENABLE_PRINTING) 434 #if defined(ENABLE_PRINTING)
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 io_thread_application_locale_ = locale; 1649 io_thread_application_locale_ = locale;
1648 } 1650 }
1649 1651
1650 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 1652 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
1651 const std::string& locale) { 1653 const std::string& locale) {
1652 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1654 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1653 io_thread_application_locale_ = locale; 1655 io_thread_application_locale_ = locale;
1654 } 1656 }
1655 1657
1656 } // namespace chrome 1658 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/cache_stats.h » ('j') | chrome/browser/net/cache_stats.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698