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

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

Issue 930853005: [Instant] Default Search Provider change redirects to local NTP in some cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: includes Created 5 years, 10 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/tab_android.h ('k') | chrome/browser/search/instant_service.cc » ('j') | 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 infobar_container->ChangeInfoBarManager(new_infobar_service); 297 infobar_container->ChangeInfoBarManager(new_infobar_service);
298 298
299 Java_Tab_swapWebContents( 299 Java_Tab_swapWebContents(
300 env, 300 env,
301 weak_java_tab_.get(env).obj(), 301 weak_java_tab_.get(env).obj(),
302 new_contents->GetJavaWebContents().obj(), 302 new_contents->GetJavaWebContents().obj(),
303 did_start_load, 303 did_start_load,
304 did_finish_load); 304 did_finish_load);
305 } 305 }
306 306
307 void TabAndroid::DefaultSearchProviderChanged() { 307 void TabAndroid::DefaultSearchProviderChanged(
308 bool google_base_url_domain_changed) {
308 // TODO(kmadhusu): Move this function definition to a common place and update 309 // TODO(kmadhusu): Move this function definition to a common place and update
309 // BrowserInstantController::DefaultSearchProviderChanged to use the same. 310 // BrowserInstantController::DefaultSearchProviderChanged to use the same.
310 if (!web_contents()) 311 if (!web_contents())
311 return; 312 return;
312 313
313 InstantService* instant_service = 314 InstantService* instant_service =
314 InstantServiceFactory::GetForProfile(GetProfile()); 315 InstantServiceFactory::GetForProfile(GetProfile());
315 if (!instant_service) 316 if (!instant_service)
316 return; 317 return;
317 318
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 // s^{n+1} / s^{n} = 2100 / 2000 816 // s^{n+1} / s^{n} = 2100 / 2000
816 // s = 1.05 817 // s = 1.05
817 // s^b = 60000 818 // s^b = 60000
818 // b = ln(60000) / ln(1.05) ~= 225 819 // b = ln(60000) / ln(1.05) ~= 225
819 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime", 820 UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime",
820 base::Time::Now() - chrome::android::GetMainEntryPointTime(), 821 base::Time::Now() - chrome::android::GetMainEntryPointTime(),
821 base::TimeDelta::FromMilliseconds(1), 822 base::TimeDelta::FromMilliseconds(1),
822 base::TimeDelta::FromMinutes(1), 823 base::TimeDelta::FromMinutes(1),
823 225); 824 225);
824 } 825 }
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/search/instant_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698