| Index: chrome/browser/extensions/api/serial/serial_event_dispatcher.cc
|
| diff --git a/chrome/browser/extensions/api/serial/serial_event_dispatcher.cc b/chrome/browser/extensions/api/serial/serial_event_dispatcher.cc
|
| index 06bbf8b4c0a0bb66d4cfec5d9b8b73fa9b9c3b31..dc93796a2b47995b2f8d4c3a58bffabf0c12b3bd 100644
|
| --- a/chrome/browser/extensions/api/serial/serial_event_dispatcher.cc
|
| +++ b/chrome/browser/extensions/api/serial/serial_event_dispatcher.cc
|
| @@ -57,7 +57,7 @@ SerialEventDispatcher::ReceiveParams::~ReceiveParams() {}
|
|
|
| void SerialEventDispatcher::PollConnection(const std::string& extension_id,
|
| int connection_id) {
|
| - DCHECK(BrowserThread::CurrentlyOn(thread_id_));
|
| + DCHECK_CURRENTLY_ON(thread_id_);
|
|
|
| ReceiveParams params;
|
| params.thread_id = thread_id_;
|
| @@ -71,7 +71,7 @@ void SerialEventDispatcher::PollConnection(const std::string& extension_id,
|
|
|
| // static
|
| void SerialEventDispatcher::StartReceive(const ReceiveParams& params) {
|
| - DCHECK(BrowserThread::CurrentlyOn(params.thread_id));
|
| + DCHECK_CURRENTLY_ON(params.thread_id);
|
|
|
| SerialConnection* connection =
|
| params.connections->Get(params.extension_id, params.connection_id);
|
| @@ -89,7 +89,7 @@ void SerialEventDispatcher::StartReceive(const ReceiveParams& params) {
|
| void SerialEventDispatcher::ReceiveCallback(const ReceiveParams& params,
|
| const std::string& data,
|
| serial::ReceiveError error) {
|
| - DCHECK(BrowserThread::CurrentlyOn(params.thread_id));
|
| + DCHECK_CURRENTLY_ON(params.thread_id);
|
|
|
| // Note that an error (e.g. timeout) does not necessarily mean that no data
|
| // was read, so we may fire an onReceive regardless of any error code.
|
| @@ -129,7 +129,7 @@ void SerialEventDispatcher::ReceiveCallback(const ReceiveParams& params,
|
| // static
|
| void SerialEventDispatcher::PostEvent(const ReceiveParams& params,
|
| scoped_ptr<extensions::Event> event) {
|
| - DCHECK(BrowserThread::CurrentlyOn(params.thread_id));
|
| + DCHECK_CURRENTLY_ON(params.thread_id);
|
|
|
| BrowserThread::PostTask(
|
| BrowserThread::UI, FROM_HERE,
|
| @@ -143,7 +143,7 @@ void SerialEventDispatcher::PostEvent(const ReceiveParams& params,
|
| void SerialEventDispatcher::DispatchEvent(void* profile_id,
|
| const std::string& extension_id,
|
| scoped_ptr<extensions::Event> event) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| Profile* profile = reinterpret_cast<Profile*>(profile_id);
|
| if (!g_browser_process->profile_manager()->IsValidProfile(profile))
|
|
|