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

Side by Side Diff: chrome/browser/android/tab_android.cc

Issue 1016473003: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/android/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/browser/android/provider/chrome_browser_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 GURL(net::EscapeExternalHandlerValue(navigation_params.url().spec())); 795 GURL(net::EscapeExternalHandlerValue(navigation_params.url().spec()));
796 return InterceptNavigationDelegate::ShouldIgnoreNavigation( 796 return InterceptNavigationDelegate::ShouldIgnoreNavigation(
797 chrome_navigation_params); 797 chrome_navigation_params);
798 } 798 }
799 }; 799 };
800 800
801 } // namespace 801 } // namespace
802 802
803 void TabAndroid::SetInterceptNavigationDelegate(JNIEnv* env, jobject obj, 803 void TabAndroid::SetInterceptNavigationDelegate(JNIEnv* env, jobject obj,
804 jobject delegate) { 804 jobject delegate) {
805 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 805 DCHECK_CURRENTLY_ON(BrowserThread::UI);
806 InterceptNavigationDelegate::Associate( 806 InterceptNavigationDelegate::Associate(
807 web_contents(), 807 web_contents(),
808 make_scoped_ptr(new ChromeInterceptNavigationDelegate(env, delegate))); 808 make_scoped_ptr(new ChromeInterceptNavigationDelegate(env, delegate)));
809 } 809 }
810 810
811 void TabAndroid::AttachToTabContentManager(JNIEnv* env, 811 void TabAndroid::AttachToTabContentManager(JNIEnv* env,
812 jobject obj, 812 jobject obj,
813 jobject jtab_content_manager) { 813 jobject jtab_content_manager) {
814 chrome::android::TabContentManager* tab_content_manager = 814 chrome::android::TabContentManager* tab_content_manager =
815 chrome::android::TabContentManager::FromJavaObject(jtab_content_manager); 815 chrome::android::TabContentManager::FromJavaObject(jtab_content_manager);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 // s^{n+1} / s^{n} = 2100 / 2000 866 // s^{n+1} / s^{n} = 2100 / 2000
867 // s = 1.05 867 // s = 1.05
868 // s^b = 60000 868 // s^b = 60000
869 // b = ln(60000) / ln(1.05) ~= 225 869 // b = ln(60000) / ln(1.05) ~= 225
870 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", 870 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime",
871 base::Time::Now() - chrome::android::GetMainEntryPointTime(), 871 base::Time::Now() - chrome::android::GetMainEntryPointTime(),
872 base::TimeDelta::FromMilliseconds(1), 872 base::TimeDelta::FromMilliseconds(1),
873 base::TimeDelta::FromMinutes(1), 873 base::TimeDelta::FromMinutes(1),
874 225); 874 225);
875 } 875 }
OLDNEW
« no previous file with comments | « chrome/browser/android/provider/chrome_browser_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698