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

Side by Side Diff: extensions/browser/extension_function_dispatcher.cc

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « extensions/browser/event_router.cc ('k') | extensions/browser/extension_message_filter.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extension_function_dispatcher.h" 5 #include "extensions/browser/extension_function_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 render_view_host_(render_view_host), 156 render_view_host_(render_view_host),
157 weak_ptr_factory_(this) { 157 weak_ptr_factory_(this) {
158 } 158 }
159 159
160 virtual ~UIThreadResponseCallbackWrapper() { 160 virtual ~UIThreadResponseCallbackWrapper() {
161 } 161 }
162 162
163 // content::WebContentsObserver overrides. 163 // content::WebContentsObserver overrides.
164 virtual void RenderViewDeleted( 164 virtual void RenderViewDeleted(
165 RenderViewHost* render_view_host) OVERRIDE { 165 RenderViewHost* render_view_host) OVERRIDE {
166 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 166 DCHECK_CURRENTLY_ON(BrowserThread::UI);
167 if (render_view_host != render_view_host_) 167 if (render_view_host != render_view_host_)
168 return; 168 return;
169 169
170 if (dispatcher_.get()) { 170 if (dispatcher_.get()) {
171 dispatcher_->ui_thread_response_callback_wrappers_ 171 dispatcher_->ui_thread_response_callback_wrappers_
172 .erase(render_view_host); 172 .erase(render_view_host);
173 } 173 }
174 174
175 delete this; 175 delete this;
176 } 176 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 return function; 510 return function;
511 } 511 }
512 512
513 // static 513 // static
514 void ExtensionFunctionDispatcher::SendAccessDenied( 514 void ExtensionFunctionDispatcher::SendAccessDenied(
515 const ExtensionFunction::ResponseCallback& callback) { 515 const ExtensionFunction::ResponseCallback& callback) {
516 base::ListValue empty_list; 516 base::ListValue empty_list;
517 callback.Run(ExtensionFunction::FAILED, empty_list, 517 callback.Run(ExtensionFunction::FAILED, empty_list,
518 "Access to extension API denied."); 518 "Access to extension API denied.");
519 } 519 }
OLDNEW
« no previous file with comments | « extensions/browser/event_router.cc ('k') | extensions/browser/extension_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698