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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.cc

Issue 10699057: Move application creation and extension install prompt showing off Browser and onto ExtensionTabHel… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/extensions/api/identity/identity_api.h" 5 #include "chrome/browser/extensions/api/identity/identity_api.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/extensions/extension_install_prompt.h" 8 #include "chrome/browser/extensions/extension_install_prompt.h"
9 #include "chrome/browser/extensions/extension_function_dispatcher.h" 9 #include "chrome/browser/extensions/extension_function_dispatcher.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 error_ = std::string(kAuthFailure) + error.ToString(); 62 error_ = std::string(kAuthFailure) + error.ToString();
63 SendResponse(false); 63 SendResponse(false);
64 Release(); // Balanced in RunImpl. 64 Release(); // Balanced in RunImpl.
65 } 65 }
66 66
67 void GetAuthTokenFunction::OnIssueAdviceSuccess( 67 void GetAuthTokenFunction::OnIssueAdviceSuccess(
68 const IssueAdviceInfo& issue_advice) { 68 const IssueAdviceInfo& issue_advice) {
69 // Existing grant was revoked and we used NO_FORCE, so we got info back 69 // Existing grant was revoked and we used NO_FORCE, so we got info back
70 // instead. 70 // instead.
71 if (interactive_) { 71 if (interactive_) {
72 install_ui_.reset(new ExtensionInstallPrompt(GetCurrentBrowser())); 72 install_ui_.reset(
73 chrome::CreateExtensionInstallPromptWithBrowser(GetCurrentBrowser()));
73 install_ui_->ConfirmIssueAdvice(this, GetExtension(), issue_advice); 74 install_ui_->ConfirmIssueAdvice(this, GetExtension(), issue_advice);
74 } else { 75 } else {
75 error_ = kNoGrant; 76 error_ = kNoGrant;
76 SendResponse(false); 77 SendResponse(false);
77 Release(); // Balanced in RunImpl. 78 Release(); // Balanced in RunImpl.
78 } 79 }
79 } 80 }
80 81
81 void GetAuthTokenFunction::InstallUIProceed() { 82 void GetAuthTokenFunction::InstallUIProceed() {
82 DCHECK(install_ui_->record_oauth2_grant()); 83 DCHECK(install_ui_->record_oauth2_grant());
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 Release(); // Balanced in RunImpl. 152 Release(); // Balanced in RunImpl.
152 } 153 }
153 154
154 void LaunchWebAuthFlowFunction::OnAuthFlowFailure() { 155 void LaunchWebAuthFlowFunction::OnAuthFlowFailure() {
155 error_ = kInvalidRedirect; 156 error_ = kInvalidRedirect;
156 SendResponse(false); 157 SendResponse(false);
157 Release(); // Balanced in RunImpl. 158 Release(); // Balanced in RunImpl.
158 } 159 }
159 160
160 } // namespace extensions 161 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/download/download_crx_util.cc ('k') | chrome/browser/extensions/api/permissions/permissions_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698