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

Side by Side Diff: chrome/browser/automation/automation_provider_observers_chromeos.cc

Issue 12704002: Support for auth code based authentication flow for both app and web UI driven flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase4 Created 7 years, 9 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) 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/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/automation/automation_provider.h" 8 #include "chrome/browser/automation/automation_provider.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/login/authentication_notification_details.h" 10 #include "chrome/browser/chromeos/login/authentication_notification_details.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 void LoginObserver::OnLoginFailure(const chromeos::LoginFailure& error) { 100 void LoginObserver::OnLoginFailure(const chromeos::LoginFailure& error) {
101 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 101 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
102 return_value->SetString("error_string", error.GetErrorString()); 102 return_value->SetString("error_string", error.GetErrorString());
103 AutomationJSONReply(automation_, reply_message_.release()) 103 AutomationJSONReply(automation_, reply_message_.release())
104 .SendSuccess(return_value.get()); 104 .SendSuccess(return_value.get());
105 delete this; 105 delete this;
106 } 106 }
107 107
108 void LoginObserver::OnLoginSuccess( 108 void LoginObserver::OnLoginSuccess(
109 const std::string& username, 109 const chromeos::UserCredentials& credentials,
110 const std::string& password,
111 bool pending_requests, 110 bool pending_requests,
112 bool using_oauth) { 111 bool using_oauth) {
113 controller_->set_login_status_consumer(NULL); 112 controller_->set_login_status_consumer(NULL);
114 AutomationJSONReply(automation_, reply_message_.release()).SendSuccess(NULL); 113 AutomationJSONReply(automation_, reply_message_.release()).SendSuccess(NULL);
115 delete this; 114 delete this;
116 } 115 }
117 116
118 WizardControllerObserver::WizardControllerObserver( 117 WizardControllerObserver::WizardControllerObserver(
119 WizardController* wizard_controller, 118 WizardController* wizard_controller,
120 AutomationProvider* automation, 119 AutomationProvider* automation,
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 reply_message_.release()).SendSuccess(NULL); 441 reply_message_.release()).SendSuccess(NULL);
443 } else { 442 } else {
444 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 443 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
445 return_value->SetString("error_string", "Enrollment failed."); 444 return_value->SetString("error_string", "Enrollment failed.");
446 AutomationJSONReply(automation_, reply_message_.release()) 445 AutomationJSONReply(automation_, reply_message_.release())
447 .SendSuccess(return_value.get()); 446 .SendSuccess(return_value.get());
448 } 447 }
449 } 448 }
450 delete this; 449 delete this;
451 } 450 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/chromeos/app_mode/kiosk_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698