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

Unified Diff: chrome_frame/chrome_active_document.cc

Issue 3443017: Committing http://codereview.chromium.org/3420004/show for grt@... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/bho.cc ('k') | chrome_frame/chrome_frame_activex.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_active_document.cc
===================================================================
--- chrome_frame/chrome_active_document.cc (revision 60165)
+++ chrome_frame/chrome_active_document.cc (working copy)
@@ -260,14 +260,19 @@
}
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 @@
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;
}
« no previous file with comments | « chrome_frame/bho.cc ('k') | chrome_frame/chrome_frame_activex.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698