| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_DICE_HEADER_HELPER_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_DICE_HEADER_HELPER_H_ |
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_DICE_HEADER_HELPER_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_DICE_HEADER_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/signin/core/browser/signin_header_helper.h" | 10 #include "components/signin/core/browser/signin_header_helper.h" |
| 11 | 11 |
| 12 class GURL; | 12 class GURL; |
| 13 | 13 |
| 14 namespace signin { | 14 namespace signin { |
| 15 | 15 |
| 16 // SigninHeaderHelper implementation managing the Dice header. | 16 // SigninHeaderHelper implementation managing the Dice header. |
| 17 class DiceHeaderHelper : public SigninHeaderHelper { | 17 class DiceHeaderHelper : public SigninHeaderHelper { |
| 18 public: | 18 public: |
| 19 DiceHeaderHelper() {} | 19 DiceHeaderHelper() {} |
| 20 ~DiceHeaderHelper() override {} | 20 ~DiceHeaderHelper() override {} |
| 21 | 21 |
| 22 // Returns the parameters contained in the X-Chrome-ID-Consistency-Response |
| 23 // response header. |
| 24 static DiceResponseParams BuildDiceResponseParams( |
| 25 const std::string& header_value); |
| 26 |
| 22 private: | 27 private: |
| 23 // SigninHeaderHelper implementation: | 28 // SigninHeaderHelper implementation: |
| 24 bool IsUrlEligibleForRequestHeader(const GURL& url) override; | 29 bool IsUrlEligibleForRequestHeader(const GURL& url) override; |
| 25 std::string BuildRequestHeader(bool is_header_request, | 30 std::string BuildRequestHeader(bool is_header_request, |
| 26 const GURL& url, | 31 const GURL& url, |
| 27 const std::string& account_id, | 32 const std::string& account_id, |
| 28 int profile_mode_mask) override; | 33 int profile_mode_mask) override; |
| 29 }; | 34 }; |
| 30 | 35 |
| 31 } // namespace signin | 36 } // namespace signin |
| 32 | 37 |
| 33 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_DICE_HEADER_HELPER_H_ | 38 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_DICE_HEADER_HELPER_H_ |
| OLD | NEW |