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

Side by Side Diff: components/signin/core/browser/dice_header_helper.cc

Issue 2923733003: [signin] Add DICe flow for account consistency requests. (Closed)
Patch Set: fix style 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/signin/core/browser/dice_header_helper.h"
6
7 #include "components/signin/core/common/profile_management_switches.h"
8 #include "google_apis/gaia/gaia_auth_util.h"
9 #include "google_apis/gaia/gaia_urls.h"
10 #include "url/gurl.h"
11
12 namespace signin {
13
14 bool DiceHeaderHelper::IsUrlEligibleForRequestHeader(const GURL& url) {
15 if (switches::GetAccountConsistencyMethod() !=
16 switches::AccountConsistencyMethod::kDice) {
17 return false;
18 }
19 return gaia::IsGaiaSignonRealm(url.GetOrigin());
20 }
21
22 std::string DiceHeaderHelper::BuildRequestHeader(bool is_header_request,
23 const GURL& url,
24 const std::string& account_id,
25 int profile_mode_mask) {
26 return "client_id=" + GaiaUrls::GetInstance()->oauth2_chrome_client_id();
27 }
28
29 } // namespace signin
OLDNEW
« no previous file with comments | « components/signin/core/browser/dice_header_helper.h ('k') | components/signin/core/browser/signin_header_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698