OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/gaia_web_auth_flow.h" | 5 #include "chrome/browser/extensions/api/identity/gaia_web_auth_flow.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 const char kRedirectPrefix[] = "Loading "; | 224 const char kRedirectPrefix[] = "Loading "; |
225 std::string prefix(kRedirectPrefix); | 225 std::string prefix(kRedirectPrefix); |
226 | 226 |
227 if (base::StartsWith(title, prefix, base::CompareCase::SENSITIVE)) { | 227 if (base::StartsWith(title, prefix, base::CompareCase::SENSITIVE)) { |
228 GURL url(title.substr(prefix.length(), std::string::npos)); | 228 GURL url(title.substr(prefix.length(), std::string::npos)); |
229 if (url.is_valid()) | 229 if (url.is_valid()) |
230 OnAuthFlowURLChange(url); | 230 OnAuthFlowURLChange(url); |
231 } | 231 } |
232 } | 232 } |
233 | 233 |
234 scoped_ptr<WebAuthFlow> GaiaWebAuthFlow::CreateWebAuthFlow(GURL url) { | 234 std::unique_ptr<WebAuthFlow> GaiaWebAuthFlow::CreateWebAuthFlow(GURL url) { |
235 return scoped_ptr<WebAuthFlow>(new WebAuthFlow(this, | 235 return std::unique_ptr<WebAuthFlow>( |
236 profile_, | 236 new WebAuthFlow(this, profile_, url, WebAuthFlow::INTERACTIVE)); |
237 url, | |
238 WebAuthFlow::INTERACTIVE)); | |
239 } | 237 } |
240 | 238 |
241 } // namespace extensions | 239 } // namespace extensions |
OLD | NEW |