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

Unified Diff: chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc

Issue 1910693002: Avoid the long merge session throttle interstitial page for NTP on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: piman's nit Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc
diff --git a/chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc b/chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc
index 27d0f69788e6ebdaf876bf6881b0bc344285b264..621ad5a076e633993521e649b99bf474815a92d1 100644
--- a/chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc
+++ b/chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc
@@ -98,7 +98,7 @@ void UnblockProfile(Profile* profile) {
}
}
-bool ShouldDelayRequest(content::WebContents* web_contents) {
+bool ShouldDelayRequestForProfile(Profile* profile) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!user_manager::UserManager::Get()->IsUserLoggedIn()) {
@@ -113,11 +113,6 @@ bool ShouldDelayRequest(content::WebContents* web_contents) {
return false;
}
- content::BrowserContext* browser_context = web_contents->GetBrowserContext();
- if (!browser_context)
- return false;
-
- Profile* profile = Profile::FromBrowserContext(browser_context);
if (!profile)
return false;
@@ -167,6 +162,15 @@ bool ShouldDelayRequest(content::WebContents* web_contents) {
return false;
}
+bool ShouldDelayRequestForWebContents(content::WebContents* web_contents) {
+ content::BrowserContext* browser_context = web_contents->GetBrowserContext();
+ if (!browser_context)
+ return false;
+
+ return ShouldDelayRequestForProfile(
+ Profile::FromBrowserContext(browser_context));
+}
+
bool ShouldDelayUrl(const GURL& url) {
// If we are loading google properties while merge session is in progress,
// we will show delayed loading page instead.
« no previous file with comments | « chrome/browser/chromeos/login/signin/merge_session_throttling_utils.h ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698