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

Side by Side Diff: chrome/browser/search/search.cc

Issue 2537263002: Prevent the pre-session-restore log spam (Closed)
Patch Set: Remove uneeded use of path service Created 4 years 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/search/search.h" 5 #include "chrome/browser/search/search.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 if (!IsURLAllowedForSupervisedUser(new_tab_url, profile)) 175 if (!IsURLAllowedForSupervisedUser(new_tab_url, profile))
176 return NEW_TAB_URL_BLOCKED; 176 return NEW_TAB_URL_BLOCKED;
177 return NEW_TAB_URL_VALID; 177 return NEW_TAB_URL_VALID;
178 } 178 }
179 179
180 bool ShouldShowLocalNewTab(const GURL& url, Profile* profile) { 180 bool ShouldShowLocalNewTab(const GURL& url, Profile* profile) {
181 #if defined(OS_CHROMEOS) 181 #if defined(OS_CHROMEOS)
182 // On Chrome OS, if the session hasn't merged yet, we need to avoid loading 182 // On Chrome OS, if the session hasn't merged yet, we need to avoid loading
183 // the remote NTP because that will trigger showing the merge session throttle 183 // the remote NTP because that will trigger showing the merge session throttle
184 // interstitial page, which can show for 5+ seconds. crbug.com/591530. 184 // interstitial page, which can show for 5+ seconds. crbug.com/591530.
185 if (merge_session_throttling_utils::ShouldDelayRequestForProfile(profile) && 185 if (merge_session_throttling_utils::ShouldDelayUrl(url) &&
186 merge_session_throttling_utils::ShouldDelayUrl(url)) { 186 merge_session_throttling_utils::IsSessionRestorePending(profile)) {
187 return true; 187 return true;
188 } 188 }
189 #endif // defined(OS_CHROMEOS) 189 #endif // defined(OS_CHROMEOS)
190 190
191 if (!profile->IsOffTheRecord() && 191 if (!profile->IsOffTheRecord() &&
192 base::FeatureList::IsEnabled(kUseGoogleLocalNtp) && 192 base::FeatureList::IsEnabled(kUseGoogleLocalNtp) &&
193 DefaultSearchProviderIsGoogle(profile)) { 193 DefaultSearchProviderIsGoogle(profile)) {
194 return true; 194 return true;
195 } 195 }
196 196
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 455
456 if (IsInstantNTPURL(*url, profile)) { 456 if (IsInstantNTPURL(*url, profile)) {
457 *url = GURL(chrome::kChromeUINewTabURL); 457 *url = GURL(chrome::kChromeUINewTabURL);
458 return true; 458 return true;
459 } 459 }
460 460
461 return false; 461 return false;
462 } 462 }
463 463
464 } // namespace search 464 } // namespace search
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698