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

Side by Side Diff: chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698