| 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 #include "chrome/browser/extensions/api/identity/identity_launch_web_auth_flow_f
unction.h" | 5 #include "chrome/browser/extensions/api/identity/identity_launch_web_auth_flow_f
unction.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/identity/identity_constants.h" | 7 #include "chrome/browser/extensions/api/identity/identity_constants.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/common/extensions/api/identity.h" | 9 #include "chrome/common/extensions/api/identity.h" |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 SendResponse(false); | 85 SendResponse(false); |
| 86 if (auth_flow_) | 86 if (auth_flow_) |
| 87 auth_flow_.release()->DetachDelegateAndDelete(); | 87 auth_flow_.release()->DetachDelegateAndDelete(); |
| 88 Release(); // Balanced in RunAsync. | 88 Release(); // Balanced in RunAsync. |
| 89 } | 89 } |
| 90 | 90 |
| 91 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange( | 91 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange( |
| 92 const GURL& redirect_url) { | 92 const GURL& redirect_url) { |
| 93 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { | 93 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { |
| 94 SetResult(base::MakeUnique<base::StringValue>(redirect_url.spec())); | 94 SetResult(base::MakeUnique<base::Value>(redirect_url.spec())); |
| 95 SendResponse(true); | 95 SendResponse(true); |
| 96 if (auth_flow_) | 96 if (auth_flow_) |
| 97 auth_flow_.release()->DetachDelegateAndDelete(); | 97 auth_flow_.release()->DetachDelegateAndDelete(); |
| 98 Release(); // Balanced in RunAsync. | 98 Release(); // Balanced in RunAsync. |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 | 101 |
| 102 } // namespace extensions | 102 } // namespace extensions |
| OLD | NEW |