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

Side by Side Diff: extensions/browser/event_router.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, 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 "extensions/browser/event_router.h" 5 #include "extensions/browser/event_router.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 return true; 603 return true;
604 } 604 }
605 605
606 return false; 606 return false;
607 } 607 }
608 608
609 // static 609 // static
610 void EventRouter::IncrementInFlightEventsOnUI( 610 void EventRouter::IncrementInFlightEventsOnUI(
611 void* browser_context_id, 611 void* browser_context_id,
612 const std::string& extension_id) { 612 const std::string& extension_id) {
613 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 613 DCHECK_CURRENTLY_ON(BrowserThread::UI);
614 BrowserContext* browser_context = 614 BrowserContext* browser_context =
615 reinterpret_cast<BrowserContext*>(browser_context_id); 615 reinterpret_cast<BrowserContext*>(browser_context_id);
616 if (!ExtensionsBrowserClient::Get()->IsValidContext(browser_context)) 616 if (!ExtensionsBrowserClient::Get()->IsValidContext(browser_context))
617 return; 617 return;
618 ExtensionSystem* extension_system = ExtensionSystem::Get(browser_context); 618 ExtensionSystem* extension_system = ExtensionSystem::Get(browser_context);
619 EventRouter* event_router = extension_system->event_router(); 619 EventRouter* event_router = extension_system->event_router();
620 if (!event_router) 620 if (!event_router)
621 return; 621 return;
622 const Extension* extension = 622 const Extension* extension =
623 ExtensionRegistry::Get(browser_context)->enabled_extensions().GetByID( 623 ExtensionRegistry::Get(browser_context)->enabled_extensions().GetByID(
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 } 768 }
769 769
770 EventListenerInfo::EventListenerInfo(const std::string& event_name, 770 EventListenerInfo::EventListenerInfo(const std::string& event_name,
771 const std::string& extension_id, 771 const std::string& extension_id,
772 content::BrowserContext* browser_context) 772 content::BrowserContext* browser_context)
773 : event_name(event_name), 773 : event_name(event_name),
774 extension_id(extension_id), 774 extension_id(extension_id),
775 browser_context(browser_context) {} 775 browser_context(browser_context) {}
776 776
777 } // namespace extensions 777 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/storage/storage_frontend.cc ('k') | extensions/browser/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698