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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 Profile* profile = GetProfile(); | 715 Profile* profile = GetProfile(); |
716 if (!profile) | 716 if (!profile) |
717 return NULL; | 717 return NULL; |
718 return prerender::PrerenderManagerFactory::GetForProfile(profile); | 718 return prerender::PrerenderManagerFactory::GetForProfile(profile); |
719 } | 719 } |
720 | 720 |
721 // static | 721 // static |
722 void TabAndroid::CreateHistoricalTabFromContents(WebContents* web_contents) { | 722 void TabAndroid::CreateHistoricalTabFromContents(WebContents* web_contents) { |
723 DCHECK(web_contents); | 723 DCHECK(web_contents); |
724 | 724 |
725 TabRestoreService* service = | 725 sessions::TabRestoreService* service = |
726 TabRestoreServiceFactory::GetForProfile( | 726 TabRestoreServiceFactory::GetForProfile( |
727 Profile::FromBrowserContext(web_contents->GetBrowserContext())); | 727 Profile::FromBrowserContext(web_contents->GetBrowserContext())); |
728 if (!service) | 728 if (!service) |
729 return; | 729 return; |
730 | 730 |
731 // Exclude internal pages from being marked as recent when they are closed. | 731 // Exclude internal pages from being marked as recent when they are closed. |
732 const GURL& tab_url = web_contents->GetURL(); | 732 const GURL& tab_url = web_contents->GetURL(); |
733 if (tab_url.SchemeIs(content::kChromeUIScheme) || | 733 if (tab_url.SchemeIs(content::kChromeUIScheme) || |
734 tab_url.SchemeIs(chrome::kChromeNativeScheme) || | 734 tab_url.SchemeIs(chrome::kChromeNativeScheme) || |
735 tab_url.SchemeIs(url::kAboutScheme)) { | 735 tab_url.SchemeIs(url::kAboutScheme)) { |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 // s^{n+1} / s^{n} = 2100 / 2000 | 979 // s^{n+1} / s^{n} = 2100 / 2000 |
980 // s = 1.05 | 980 // s = 1.05 |
981 // s^b = 60000 | 981 // s^b = 60000 |
982 // b = ln(60000) / ln(1.05) ~= 225 | 982 // b = ln(60000) / ln(1.05) ~= 225 |
983 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", | 983 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", |
984 base::Time::Now() - chrome::android::GetMainEntryPointTime(), | 984 base::Time::Now() - chrome::android::GetMainEntryPointTime(), |
985 base::TimeDelta::FromMilliseconds(1), | 985 base::TimeDelta::FromMilliseconds(1), |
986 base::TimeDelta::FromMinutes(1), | 986 base::TimeDelta::FromMinutes(1), |
987 225); | 987 225); |
988 } | 988 } |
OLD | NEW |