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

Side by Side Diff: chrome/browser/ui/auto_login_prompter.cc

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 12 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 | « chrome/browser/translate/translate_prefs.cc ('k') | chrome/browser/ui/browser.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/auto_login_prompter.h" 5 #include "chrome/browser/ui/auto_login_prompter.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/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 205 }
206 206
207 bool AutoLoginInfoBarDelegate::Accept() { 207 bool AutoLoginInfoBarDelegate::Accept() {
208 // AutoLoginRedirector deletes itself. 208 // AutoLoginRedirector deletes itself.
209 new AutoLoginRedirector(token_service_, navigation_controller_, args_); 209 new AutoLoginRedirector(token_service_, navigation_controller_, args_);
210 return true; 210 return true;
211 } 211 }
212 212
213 bool AutoLoginInfoBarDelegate::Cancel() { 213 bool AutoLoginInfoBarDelegate::Cancel() {
214 pref_service_->SetBoolean(prefs::kAutologinEnabled, false); 214 pref_service_->SetBoolean(prefs::kAutologinEnabled, false);
215 pref_service_->ScheduleSavePersistentPrefs();
216 return true; 215 return true;
217 } 216 }
218 217
219 218
220 // AutoLoginPrompter ---------------------------------------------------------- 219 // AutoLoginPrompter ----------------------------------------------------------
221 220
222 AutoLoginPrompter::AutoLoginPrompter( 221 AutoLoginPrompter::AutoLoginPrompter(
223 WebContents* web_contents, 222 WebContents* web_contents,
224 const std::string& username, 223 const std::string& username,
225 const std::string& args) 224 const std::string& args)
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 infobar_helper, &web_contents_->GetController(), 336 infobar_helper, &web_contents_->GetController(),
338 profile->GetTokenService(), profile->GetPrefs(), 337 profile->GetTokenService(), profile->GetPrefs(),
339 username_, args_)); 338 username_, args_));
340 } 339 }
341 } 340 }
342 // Either we couldn't add the infobar, we added the infobar, or the tab 341 // Either we couldn't add the infobar, we added the infobar, or the tab
343 // contents was destroyed before the navigation completed. In any case 342 // contents was destroyed before the navigation completed. In any case
344 // there's no reason to live further. 343 // there's no reason to live further.
345 delete this; 344 delete this;
346 } 345 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_prefs.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698