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

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 chromeos Created 9 years, 2 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
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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 bool AutoLoginInfoBarDelegate::Accept() { 201 bool AutoLoginInfoBarDelegate::Accept() {
202 // AutoLoginRedirector deletes itself. 202 // AutoLoginRedirector deletes itself.
203 new AutoLoginRedirector(token_service_, navigation_controller_, args_); 203 new AutoLoginRedirector(token_service_, navigation_controller_, args_);
204 return true; 204 return true;
205 } 205 }
206 206
207 bool AutoLoginInfoBarDelegate::Cancel() { 207 bool AutoLoginInfoBarDelegate::Cancel() {
208 pref_service_->SetBoolean(prefs::kAutologinEnabled, false); 208 pref_service_->SetBoolean(prefs::kAutologinEnabled, false);
209 pref_service_->ScheduleSavePersistentPrefs();
210 return true; 209 return true;
211 } 210 }
212 211
213 212
214 // AutoLoginPrompter ---------------------------------------------------------- 213 // AutoLoginPrompter ----------------------------------------------------------
215 214
216 AutoLoginPrompter::AutoLoginPrompter( 215 AutoLoginPrompter::AutoLoginPrompter(
217 TabContents* tab_contents, 216 TabContents* tab_contents,
218 const std::string& username, 217 const std::string& username,
219 const std::string& args) 218 const std::string& args)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 infobar_helper, &tab_contents_->controller(), 328 infobar_helper, &tab_contents_->controller(),
330 profile->GetTokenService(), profile->GetPrefs(), 329 profile->GetTokenService(), profile->GetPrefs(),
331 username_, args_)); 330 username_, args_));
332 } 331 }
333 } 332 }
334 // Either we couldn't add the infobar, we added the infobar, or the tab 333 // Either we couldn't add the infobar, we added the infobar, or the tab
335 // contents was destroyed before the navigation completed. In any case 334 // contents was destroyed before the navigation completed. In any case
336 // there's no reason to live further. 335 // there's no reason to live further.
337 delete this; 336 delete this;
338 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698