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

Side by Side Diff: chrome/browser/tab_contents/navigation_metrics_recorder.cc

Issue 2019373002: Fix page transition qualifiers not masked out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added one more occurrence. Created 4 years, 6 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/tab_contents/navigation_metrics_recorder.h" 5 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/tab_contents/origins_seen_service_factory.h" 10 #include "chrome/browser/tab_contents/origins_seen_service_factory.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const url::Origin origin(details.entry->GetVirtualURL()); 47 const url::Origin origin(details.entry->GetVirtualURL());
48 bool have_already_seen_origin = service->Insert(origin); 48 bool have_already_seen_origin = service->Insert(origin);
49 49
50 navigation_metrics::RecordMainFrameNavigation( 50 navigation_metrics::RecordMainFrameNavigation(
51 details.entry->GetVirtualURL(), details.is_in_page, 51 details.entry->GetVirtualURL(), details.is_in_page,
52 context->IsOffTheRecord(), have_already_seen_origin); 52 context->IsOffTheRecord(), have_already_seen_origin);
53 53
54 // Record the domain and registry of the URL that resulted in a navigation to 54 // Record the domain and registry of the URL that resulted in a navigation to
55 // a |data:| URL, either by redirects or user clicking a link. 55 // a |data:| URL, either by redirects or user clicking a link.
56 if (details.entry->GetVirtualURL().SchemeIs(url::kDataScheme) && 56 if (details.entry->GetVirtualURL().SchemeIs(url::kDataScheme) &&
57 params.transition != ui::PAGE_TRANSITION_TYPED && 57 !ui::PageTransitionCoreTypeIs(params.transition,
58 ui::PAGE_TRANSITION_TYPED) &&
58 !details.previous_url.is_empty()) { 59 !details.previous_url.is_empty()) {
59 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), 60 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(),
60 "Navigation.Scheme.Data", 61 "Navigation.Scheme.Data",
61 details.previous_url); 62 details.previous_url);
62 } 63 }
63 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_preview_dialog_controller.cc ('k') | chrome/browser/ui/panels/panel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698