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

Unified Diff: chrome/browser/signin/chrome_signin_helper.cc

Issue 2946693002: Use GN buildflags and features to configure account consistency (Closed)
Patch Set: fix Created 3 years, 6 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/signin/chrome_signin_helper.cc
diff --git a/chrome/browser/signin/chrome_signin_helper.cc b/chrome/browser/signin/chrome_signin_helper.cc
index c7639a5191f9d1546a5121321ed057c5706e76fb..aa73baba4b73d3e9125090edfb2fb62128210128 100644
--- a/chrome/browser/signin/chrome_signin_helper.cc
+++ b/chrome/browser/signin/chrome_signin_helper.cc
@@ -20,6 +20,7 @@
#include "components/signin/core/browser/chrome_connected_header_helper.h"
#include "components/signin/core/browser/signin_header_helper.h"
#include "components/signin/core/common/profile_management_switches.h"
+#include "components/signin/core/common/signin_features.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "google_apis/gaia/gaia_auth_util.h"
@@ -40,7 +41,7 @@ namespace {
const char kChromeManageAccountsHeader[] = "X-Chrome-Manage-Accounts";
-#if !defined(OS_ANDROID)
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
const char kDiceResponseHeader[] = "X-Chrome-ID-Consistency-Response";
#endif
@@ -107,7 +108,7 @@ void ProcessMirrorHeaderUIThread(
#endif // !defined(OS_ANDROID)
}
-#if !defined(OS_ANDROID)
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
void ProcessDiceHeaderUIThread(
const DiceResponseParams& dice_params,
const content::ResourceRequestInfo::WebContentsGetter&
@@ -128,7 +129,7 @@ void ProcessDiceHeaderUIThread(
DiceResponseHandler::GetForProfile(profile);
dice_response_handler->ProcessDiceHeader(dice_params);
}
-#endif // !defined(OS_ANDROID)
+#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
// Looks for the X-Chrome-Manage-Accounts response header, and if found,
// tries to show the avatar bubble in the browser identified by the
@@ -182,7 +183,7 @@ void ProcessMirrorResponseHeaderIfExists(
base::Bind(ProcessMirrorHeaderUIThread, params, web_contents_getter));
}
-#if !defined(OS_ANDROID)
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
void ProcessDiceResponseHeaderIfExists(
net::URLRequest* request,
ProfileIOData* io_data,
@@ -226,7 +227,7 @@ void ProcessDiceResponseHeaderIfExists(
content::BrowserThread::UI, FROM_HERE,
base::Bind(ProcessDiceHeaderUIThread, params, web_contents_getter));
}
-#endif // !defined(OS_ANDROID)
+#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
} // namespace
@@ -284,11 +285,11 @@ void ProcessAccountConsistencyResponseHeaders(
} else {
// This is a redirect.
-#if !defined(OS_ANDROID)
+#if BUILDFLAG(ENABLE_DICE_SUPPORT)
// Process the Dice header: on sign-in, exchange the authorization code for
// a refresh token, on sign-out just follow the sign-out URL.
ProcessDiceResponseHeaderIfExists(request, io_data, web_contents_getter);
-#endif
+#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
}
}
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698