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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 10825059: Fix memory leak (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: passing the value Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/sync/one_click_signin_helper.h" 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return false; 261 return false;
262 } 262 }
263 } 263 }
264 } 264 }
265 265
266 // If email was already rejected by this profile for one-click sign-in. 266 // If email was already rejected by this profile for one-click sign-in.
267 if (!email.empty()) { 267 if (!email.empty()) {
268 const ListValue* rejected_emails = profile->GetPrefs()->GetList( 268 const ListValue* rejected_emails = profile->GetPrefs()->GetList(
269 prefs::kReverseAutologinRejectedEmailList); 269 prefs::kReverseAutologinRejectedEmailList);
270 if (!rejected_emails->empty()) { 270 if (!rejected_emails->empty()) {
271 const Value* email_value = Value::CreateStringValue(email); 271 const scoped_ptr<Value> email_value(Value::CreateStringValue(email));
272 ListValue::const_iterator iter = rejected_emails->Find( 272 ListValue::const_iterator iter = rejected_emails->Find(
273 *email_value); 273 *email_value.get());
Roger Tawa OOO till Jul 10th 2012/07/27 19:31:56 nit: replace with *email_value
274 if (iter != rejected_emails->end()) 274 if (iter != rejected_emails->end())
275 return false; 275 return false;
276 } 276 }
277 } 277 }
278 } 278 }
279 279
280 return true; 280 return true;
281 } 281 }
282 282
283 // static 283 // static
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 session_index_ = session_index; 378 session_index_ = session_index;
379 email_ = email; 379 email_ = email;
380 } 380 }
381 381
382 void OneClickSigninHelper::SavePassword(const std::string& password) { 382 void OneClickSigninHelper::SavePassword(const std::string& password) {
383 // TODO(rogerta): in the case of a 2-factor or captcha or some other type of 383 // TODO(rogerta): in the case of a 2-factor or captcha or some other type of
384 // challenge, its possible for the user to never complete the signin. 384 // challenge, its possible for the user to never complete the signin.
385 // Should have a way to detect this and clear the password member. 385 // Should have a way to detect this and clear the password member.
386 password_ = password; 386 password_ = password;
387 } 387 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698