OLD | NEW |
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/android/tab_android.h" | 5 #include "chrome/browser/android/tab_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "chrome/common/url_constants.h" | 49 #include "chrome/common/url_constants.h" |
50 #include "components/bookmarks/browser/bookmark_model.h" | 50 #include "components/bookmarks/browser/bookmark_model.h" |
51 #include "components/bookmarks/browser/bookmark_node.h" | 51 #include "components/bookmarks/browser/bookmark_node.h" |
52 #include "components/bookmarks/browser/bookmark_utils.h" | 52 #include "components/bookmarks/browser/bookmark_utils.h" |
53 #include "components/bookmarks/managed/managed_bookmark_service.h" | 53 #include "components/bookmarks/managed/managed_bookmark_service.h" |
54 #include "components/dom_distiller/core/url_utils.h" | 54 #include "components/dom_distiller/core/url_utils.h" |
55 #include "components/favicon/content/content_favicon_driver.h" | 55 #include "components/favicon/content/content_favicon_driver.h" |
56 #include "components/infobars/core/infobar_container.h" | 56 #include "components/infobars/core/infobar_container.h" |
57 #include "components/navigation_interception/intercept_navigation_delegate.h" | 57 #include "components/navigation_interception/intercept_navigation_delegate.h" |
58 #include "components/navigation_interception/navigation_params.h" | 58 #include "components/navigation_interception/navigation_params.h" |
59 #include "components/url_fixer/url_fixer.h" | 59 #include "components/url_formatter/url_fixer.h" |
60 #include "content/public/browser/android/compositor.h" | 60 #include "content/public/browser/android/compositor.h" |
61 #include "content/public/browser/android/content_view_core.h" | 61 #include "content/public/browser/android/content_view_core.h" |
62 #include "content/public/browser/browser_thread.h" | 62 #include "content/public/browser/browser_thread.h" |
63 #include "content/public/browser/interstitial_page.h" | 63 #include "content/public/browser/interstitial_page.h" |
64 #include "content/public/browser/navigation_entry.h" | 64 #include "content/public/browser/navigation_entry.h" |
65 #include "content/public/browser/notification_service.h" | 65 #include "content/public/browser/notification_service.h" |
66 #include "content/public/browser/render_frame_host.h" | 66 #include "content/public/browser/render_frame_host.h" |
67 #include "content/public/browser/render_process_host.h" | 67 #include "content/public/browser/render_process_host.h" |
68 #include "content/public/browser/render_view_host.h" | 68 #include "content/public/browser/render_view_host.h" |
69 #include "content/public/browser/user_metrics.h" | 69 #include "content/public/browser/user_metrics.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 } | 563 } |
564 prerenderer->Cancel(); | 564 prerenderer->Cancel(); |
565 } | 565 } |
566 if (prerender_manager->MaybeUsePrerenderedPage(gurl, ¶ms)) { | 566 if (prerender_manager->MaybeUsePrerenderedPage(gurl, ¶ms)) { |
567 return prefetched_page_loaded ? | 567 return prefetched_page_loaded ? |
568 FULL_PRERENDERED_PAGE_LOAD : PARTIAL_PRERENDERED_PAGE_LOAD; | 568 FULL_PRERENDERED_PAGE_LOAD : PARTIAL_PRERENDERED_PAGE_LOAD; |
569 } | 569 } |
570 } | 570 } |
571 | 571 |
572 GURL fixed_url( | 572 GURL fixed_url( |
573 url_fixer::FixupURL(gurl.possibly_invalid_spec(), std::string())); | 573 url_formatter::FixupURL(gurl.possibly_invalid_spec(), std::string())); |
574 if (!fixed_url.is_valid()) | 574 if (!fixed_url.is_valid()) |
575 return PAGE_LOAD_FAILED; | 575 return PAGE_LOAD_FAILED; |
576 | 576 |
577 if (!HandleNonNavigationAboutURL(fixed_url)) { | 577 if (!HandleNonNavigationAboutURL(fixed_url)) { |
578 // Record UMA "ShowHistory" here. That way it'll pick up both user | 578 // Record UMA "ShowHistory" here. That way it'll pick up both user |
579 // typing chrome://history as well as selecting from the drop down menu. | 579 // typing chrome://history as well as selecting from the drop down menu. |
580 if (fixed_url.spec() == chrome::kChromeUIHistoryURL) { | 580 if (fixed_url.spec() == chrome::kChromeUIHistoryURL) { |
581 content::RecordAction(base::UserMetricsAction("ShowHistory")); | 581 content::RecordAction(base::UserMetricsAction("ShowHistory")); |
582 } | 582 } |
583 | 583 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 // s^{n+1} / s^{n} = 2100 / 2000 | 878 // s^{n+1} / s^{n} = 2100 / 2000 |
879 // s = 1.05 | 879 // s = 1.05 |
880 // s^b = 60000 | 880 // s^b = 60000 |
881 // b = ln(60000) / ln(1.05) ~= 225 | 881 // b = ln(60000) / ln(1.05) ~= 225 |
882 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", | 882 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", |
883 base::Time::Now() - chrome::android::GetMainEntryPointTime(), | 883 base::Time::Now() - chrome::android::GetMainEntryPointTime(), |
884 base::TimeDelta::FromMilliseconds(1), | 884 base::TimeDelta::FromMilliseconds(1), |
885 base::TimeDelta::FromMinutes(1), | 885 base::TimeDelta::FromMinutes(1), |
886 225); | 886 225); |
887 } | 887 } |
OLD | NEW |