| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/signin/easy_unlock_toggle_flow.h" | 5 #include "chrome/browser/signin/easy_unlock_toggle_flow.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 class EasyUnlockToggleFlow::ToggleApiCall : public OAuth2ApiCallFlow { | 52 class EasyUnlockToggleFlow::ToggleApiCall : public OAuth2ApiCallFlow { |
| 53 public: | 53 public: |
| 54 ToggleApiCall(EasyUnlockToggleFlow* flow, | 54 ToggleApiCall(EasyUnlockToggleFlow* flow, |
| 55 net::URLRequestContextGetter* context, | 55 net::URLRequestContextGetter* context, |
| 56 const std::string& access_token, | 56 const std::string& access_token, |
| 57 const std::string& phone_public_key, | 57 const std::string& phone_public_key, |
| 58 bool toggle_enable); | 58 bool toggle_enable); |
| 59 virtual ~ToggleApiCall(); | 59 virtual ~ToggleApiCall(); |
| 60 | 60 |
| 61 // OAuth2ApiCallFlow | 61 // OAuth2ApiCallFlow |
| 62 virtual GURL CreateApiCallUrl() OVERRIDE; | 62 virtual GURL CreateApiCallUrl() override; |
| 63 virtual std::string CreateApiCallBody() OVERRIDE; | 63 virtual std::string CreateApiCallBody() override; |
| 64 virtual std::string CreateApiCallBodyContentType() OVERRIDE; | 64 virtual std::string CreateApiCallBodyContentType() override; |
| 65 virtual void ProcessApiCallSuccess(const net::URLFetcher* source) OVERRIDE; | 65 virtual void ProcessApiCallSuccess(const net::URLFetcher* source) override; |
| 66 virtual void ProcessApiCallFailure(const net::URLFetcher* source) OVERRIDE; | 66 virtual void ProcessApiCallFailure(const net::URLFetcher* source) override; |
| 67 virtual void ProcessNewAccessToken(const std::string& access_token) OVERRIDE; | 67 virtual void ProcessNewAccessToken(const std::string& access_token) override; |
| 68 virtual void ProcessMintAccessTokenFailure( | 68 virtual void ProcessMintAccessTokenFailure( |
| 69 const GoogleServiceAuthError& error) OVERRIDE; | 69 const GoogleServiceAuthError& error) override; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 EasyUnlockToggleFlow* flow_; | 72 EasyUnlockToggleFlow* flow_; |
| 73 const std::string phone_public_key_; | 73 const std::string phone_public_key_; |
| 74 const bool toggle_enable_; | 74 const bool toggle_enable_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(ToggleApiCall); | 76 DISALLOW_COPY_AND_ASSIGN(ToggleApiCall); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 EasyUnlockToggleFlow::ToggleApiCall::ToggleApiCall( | 79 EasyUnlockToggleFlow::ToggleApiCall::ToggleApiCall( |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 204 } |
| 205 | 205 |
| 206 void EasyUnlockToggleFlow::OnIssueAdviceSuccess( | 206 void EasyUnlockToggleFlow::OnIssueAdviceSuccess( |
| 207 const IssueAdviceInfo& issue_advice) { | 207 const IssueAdviceInfo& issue_advice) { |
| 208 NOTREACHED(); | 208 NOTREACHED(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void EasyUnlockToggleFlow::ReportToggleApiCallResult(bool success) { | 211 void EasyUnlockToggleFlow::ReportToggleApiCallResult(bool success) { |
| 212 callback_.Run(success); | 212 callback_.Run(success); |
| 213 } | 213 } |
| OLD | NEW |