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

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

Issue 11415226: webui/options: Do not use Value::CreateStringValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years 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 | chrome/browser/ui/webui/options/autofill_options_handler.cc » ('j') | 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/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 return false; 426 return false;
427 } 427 }
428 } 428 }
429 } 429 }
430 430
431 // If email was already rejected by this profile for one-click sign-in. 431 // If email was already rejected by this profile for one-click sign-in.
432 if (!email.empty()) { 432 if (!email.empty()) {
433 const ListValue* rejected_emails = profile->GetPrefs()->GetList( 433 const ListValue* rejected_emails = profile->GetPrefs()->GetList(
434 prefs::kReverseAutologinRejectedEmailList); 434 prefs::kReverseAutologinRejectedEmailList);
435 if (!rejected_emails->empty()) { 435 if (!rejected_emails->empty()) {
436 const scoped_ptr<Value> email_value(new base::StringValue(email));
437 base::ListValue::const_iterator iter = rejected_emails->Find( 436 base::ListValue::const_iterator iter = rejected_emails->Find(
438 *email_value); 437 base::StringValue(email));
439 if (iter != rejected_emails->end()) 438 if (iter != rejected_emails->end())
440 return false; 439 return false;
441 } 440 }
442 } 441 }
443 442
444 // If we're about to show a one-click infobar but the user has started 443 // If we're about to show a one-click infobar but the user has started
445 // a concurrent signin flow (perhaps via the promo), we may not have yet 444 // a concurrent signin flow (perhaps via the promo), we may not have yet
446 // established an authenticated username but we still shouldn't move 445 // established an authenticated username but we still shouldn't move
447 // forward with two simultaneous signin processes. This is a bit 446 // forward with two simultaneous signin processes. This is a bit
448 // contentious as the one-click flow is a much smoother flow from the user 447 // contentious as the one-click flow is a much smoother flow from the user
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 std::string()); 777 std::string());
779 } 778 }
780 779
781 void OneClickSigninHelper::SigninFailed(const GoogleServiceAuthError& error) { 780 void OneClickSigninHelper::SigninFailed(const GoogleServiceAuthError& error) {
782 signin_tracker_.reset(); 781 signin_tracker_.reset();
783 } 782 }
784 783
785 void OneClickSigninHelper::SigninSuccess() { 784 void OneClickSigninHelper::SigninSuccess() {
786 signin_tracker_.reset(); 785 signin_tracker_.reset();
787 } 786 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/autofill_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698