| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 Java_Tab_getNativeInfoBarContainer( | 283 Java_Tab_getNativeInfoBarContainer( |
| 284 env, | 284 env, |
| 285 weak_java_tab_.get(env).obj())); | 285 weak_java_tab_.get(env).obj())); |
| 286 InfoBarService* new_infobar_service = | 286 InfoBarService* new_infobar_service = |
| 287 new_contents ? InfoBarService::FromWebContents(new_contents) : NULL; | 287 new_contents ? InfoBarService::FromWebContents(new_contents) : NULL; |
| 288 infobar_container->ChangeInfoBarManager(new_infobar_service); | 288 infobar_container->ChangeInfoBarManager(new_infobar_service); |
| 289 | 289 |
| 290 Java_Tab_swapWebContents( | 290 Java_Tab_swapWebContents( |
| 291 env, | 291 env, |
| 292 weak_java_tab_.get(env).obj(), | 292 weak_java_tab_.get(env).obj(), |
| 293 reinterpret_cast<intptr_t>(new_contents), | 293 new_contents->GetJavaWebContents().obj(), |
| 294 did_start_load, | 294 did_start_load, |
| 295 did_finish_load); | 295 did_finish_load); |
| 296 } | 296 } |
| 297 | 297 |
| 298 void TabAndroid::DefaultSearchProviderChanged() { | 298 void TabAndroid::DefaultSearchProviderChanged() { |
| 299 // TODO(kmadhusu): Move this function definition to a common place and update | 299 // TODO(kmadhusu): Move this function definition to a common place and update |
| 300 // BrowserInstantController::DefaultSearchProviderChanged to use the same. | 300 // BrowserInstantController::DefaultSearchProviderChanged to use the same. |
| 301 if (!web_contents()) | 301 if (!web_contents()) |
| 302 return; | 302 return; |
| 303 | 303 |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 // s^{n+1} / s^{n} = 2100 / 2000 | 761 // s^{n+1} / s^{n} = 2100 / 2000 |
| 762 // s = 1.05 | 762 // s = 1.05 |
| 763 // s^b = 60000 | 763 // s^b = 60000 |
| 764 // b = ln(60000) / ln(1.05) ~= 225 | 764 // b = ln(60000) / ln(1.05) ~= 225 |
| 765 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", | 765 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", |
| 766 base::Time::Now() - chrome::android::GetMainEntryPointTime(), | 766 base::Time::Now() - chrome::android::GetMainEntryPointTime(), |
| 767 base::TimeDelta::FromMilliseconds(1), | 767 base::TimeDelta::FromMilliseconds(1), |
| 768 base::TimeDelta::FromMinutes(1), | 768 base::TimeDelta::FromMinutes(1), |
| 769 225); | 769 225); |
| 770 } | 770 } |
| OLD | NEW |