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

Side by Side Diff: components/signin/core/browser/chrome_connected_header_helper.h

Issue 2923733003: [signin] Add DICe flow for account consistency requests. (Closed)
Patch Set: Add test for Dice disabled 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 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_CHROME_CONNECTED_HEADER_HELPER_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_CHROME_CONNECTED_HEADER_HELPER_H_
7
8 #include <string>
9
10 #include "components/signin/core/browser/signin_header_helper.h"
11
12 class GURL;
13
14 namespace signin {
15
16 extern const char kChromeConnectedHeader[];
17
18 // SigninHeaderHelper implementation managing the "X-Chrome-Connected" header.
19 class ChromeConnectedHeaderHelper : public SigninHeaderHelper {
msarda 2017/06/08 23:43:04 I think in general we add the constructor and the
droger 2017/06/09 09:52:24 Done.
20 public:
21 // Returns the CHROME_CONNECTED cookie, or an empty string if it should not be
22 // added to the request to |url|.
23 static std::string BuildRequestCookieIfPossible(
24 const GURL& url,
25 const std::string& account_id,
26 const content_settings::CookieSettings* cookie_settings,
27 int profile_mode_mask);
28
29 private:
30 // Returns whether the URL is eligible for the GaiaID parameter.
msarda 2017/06/08 23:43:04 s/GaiaID/Gaia ID
droger 2017/06/09 09:52:24 Done.
31 bool IsUrlEligibleToIncludeGaiaId(const GURL& url, bool is_header_request);
32
33 // Returns whether the URL has a Google Drive origin.
34 bool IsDriveOrigin(const GURL& url);
35
36 // SigninHeaderHelper implementation:
37 bool IsUrlEligibleForRequestHeader(const GURL& url) override;
38 std::string BuildRequestHeader(bool is_header_request,
39 const GURL& url,
40 const std::string& account_id,
41 int profile_mode_mask) override;
42 };
43
44 } // namespace signin
45
46 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_CHROME_CONNECTED_HEADER_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698