Index: content/renderer/render_thread_impl.h |
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h |
index d39fb9e9e0c38360c1ae8a01df9460a88cd8bc3f..f991b19d5748619279b59cc85770ee347a5a995d 100644 |
--- a/content/renderer/render_thread_impl.h |
+++ b/content/renderer/render_thread_impl.h |
@@ -238,6 +238,17 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread, |
// first call. |
content::AudioRendererMixerManager* GetAudioRendererMixerManager(); |
+ // Called when a top frame of a RenderView navigates. This function updates |
+ // RenderViewThread's information about whether all RenderViews are displaying |
Charlie Reis
2012/08/22 23:09:59
nit: RenderViewThread -> RenderThreadImpl?
marja
2012/08/23 14:15:00
Done.
|
+ // a page from the same host. |host| is the host where a RenderView navigated, |
+ // and |view_count| is the number of RenderViews in this process. |
+ void RenderViewNavigatedToHost(const std::string& host, size_t view_count); |
+ |
+ // Used for customizing some histograms if all RenderViews share the same |
+ // host. Returns the current custom histogram name to use for |
+ // |histogram_name|, or |histogram_name| if it shouldn't be customized. |
+ std::string ConvertToCustomHistogramName(const char* histogram_name); |
+ |
private: |
virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; |
@@ -254,6 +265,15 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread, |
void IdleHandlerInForegroundTab(); |
+ // Used for updating the information on which is the common host which all |
+ // RenderView's share (if any). If there is no common host, this function is |
+ // called with an empty string. |
+ void SetCommonHost(const std::string& host); |
+ |
+ // For initializing information about which histograms should be customized |
+ // per host. |
+ void InitializeCustomHistograms(); |
+ |
// These objects live solely on the render thread. |
scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; |
scoped_ptr<DomStorageDispatcher> dom_storage_dispatcher_; |
@@ -318,6 +338,11 @@ class CONTENT_EXPORT RenderThreadImpl : public content::RenderThread, |
scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_; |
+ // For producing custom histograms if all RenderViews share the same host. |
Charlie Reis
2012/08/22 23:09:59
Can you say a bit more? e.g., that the histogram
marja
2012/08/23 14:15:00
Done.
|
+ std::string common_host_; |
+ std::string custom_page_; |
Charlie Reis
2012/08/22 23:09:59
custom_page_ doesn't reveal much about what it's f
marja
2012/08/23 14:15:00
Done.
|
+ std::set<std::string> custom_histograms_; |
+ |
DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
}; |