diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 17:02:58 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 17:02:58 +0000 |
commit | d8e135173589b4d88f5d24dce9b81d7278d9c18a (patch) | |
tree | 67e4ca492ae31ad7e8c293575bcae9d777464519 /chrome_frame/chrome_active_document.cc | |
parent | 3d75a0c7627845e03ee87e82a5da40e133f55cc7 (diff) | |
download | chromium_src-d8e135173589b4d88f5d24dce9b81d7278d9c18a.zip chromium_src-d8e135173589b4d88f5d24dce9b81d7278d9c18a.tar.gz chromium_src-d8e135173589b4d88f5d24dce9b81d7278d9c18a.tar.bz2 |
Committing http://codereview.chromium.org/3420004/show for grt@
Original description:
- added detection of IE9 for ChromeFrame.IEVersion metric
- replaced ChromeFrame.FullTabLaunchType metric with ChromeFrame.LaunchType metric,
which logs more info regarding how it came to be that GCF rendered a page
(but only for the CTransaction patch)
BUG=43885
TEST=none
Review URL: http://codereview.chromium.org/3443017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_active_document.cc')
-rw-r--r-- | chrome_frame/chrome_active_document.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc index d5c4250..516dd09 100644 --- a/chrome_frame/chrome_active_document.cc +++ b/chrome_frame/chrome_active_document.cc @@ -260,14 +260,19 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable, } std::string referrer(mgr ? mgr->referrer() : EmptyString()); + RendererType renderer_type = cf_url.is_chrome_protocol() ? + RENDERER_TYPE_CHROME_GCF_PROTOCOL : RENDERER_TYPE_UNDETERMINED; // With CTransaction patch we have more robust way to grab the referrer for // each top-level-switch-to-CF request by peeking at our sniffing data - // object that lives inside the bind context. + // object that lives inside the bind context. We also remember the reason + // we're rendering the document in Chrome. if (g_patch_helper.state() == PatchHelper::PATCH_PROTOCOL && info) { scoped_refptr<ProtData> prot_data = info->get_prot_data(); - if (prot_data) + if (prot_data) { referrer = prot_data->referrer(); + renderer_type = prot_data->renderer_type(); + } } // For gcf: URLs allow only about and view-source schemes to pass through for @@ -288,9 +293,14 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable, if (!cf_url.is_chrome_protocol() && !cf_url.attach_to_external_tab()) url_fetcher_->SetInfoForUrl(url.c_str(), moniker_name, bind_context); - THREAD_SAFE_UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.FullTabLaunchType", - cf_url.is_chrome_protocol(), - 0, 1, 2); + // Log a metric indicating why GCF is rendering in Chrome. + // (Note: we only track the renderer type when using the CTransaction patch. + // When the code for the browser service patch and for the moniker patch is + // removed, this conditional can also go away.) + if (RENDERER_TYPE_UNDETERMINED != renderer_type) { + THREAD_SAFE_UMA_LAUNCH_TYPE_COUNT(renderer_type); + } + return S_OK; } |