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

Side by Side Diff: chrome/browser/extensions/extension_function.cc

Issue 8520035: Revert 110264 - Fix for management API related to escalated permissions disabled extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/extensions/extension_function.h" 5 #include "chrome/browser/extensions/extension_function.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/logging.h" 8 #include "base/logging.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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 181
182 void IOThreadExtensionFunction::SendResponse(bool success) { 182 void IOThreadExtensionFunction::SendResponse(bool success) {
183 if (!ipc_sender()) 183 if (!ipc_sender())
184 return; 184 return;
185 185
186 SendResponseImpl(ipc_sender()->peer_handle(), 186 SendResponseImpl(ipc_sender()->peer_handle(),
187 ipc_sender(), routing_id_, success); 187 ipc_sender(), routing_id_, success);
188 } 188 }
189 189
190 AsyncExtensionFunction::AsyncExtensionFunction() : delegate_(NULL) { 190 AsyncExtensionFunction::AsyncExtensionFunction() {
191 }
192
193 void AsyncExtensionFunction::SendResponse(bool success) {
194 if (delegate_)
195 delegate_->OnSendResponse(this, success);
196 else
197 UIThreadExtensionFunction::SendResponse(success);
198 } 191 }
199 192
200 AsyncExtensionFunction::~AsyncExtensionFunction() { 193 AsyncExtensionFunction::~AsyncExtensionFunction() {
201 } 194 }
202 195
203 SyncExtensionFunction::SyncExtensionFunction() { 196 SyncExtensionFunction::SyncExtensionFunction() {
204 } 197 }
205 198
206 SyncExtensionFunction::~SyncExtensionFunction() { 199 SyncExtensionFunction::~SyncExtensionFunction() {
207 } 200 }
208 201
209 void SyncExtensionFunction::Run() { 202 void SyncExtensionFunction::Run() {
210 SendResponse(RunImpl()); 203 SendResponse(RunImpl());
211 } 204 }
212 205
213 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { 206 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() {
214 } 207 }
215 208
216 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { 209 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() {
217 } 210 }
218 211
219 void SyncIOThreadExtensionFunction::Run() { 212 void SyncIOThreadExtensionFunction::Run() {
220 SendResponse(RunImpl()); 213 SendResponse(RunImpl());
221 } 214 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function.h ('k') | chrome/browser/extensions/extension_function_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698