| OLD | NEW |
| 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 "content/browser/dom_storage/dom_storage_message_filter.h" | 5 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/strings/nullable_string16.h" | 9 #include "base/strings/nullable_string16.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 void DOMStorageMessageFilter::UninitializeInSequence() { | 41 void DOMStorageMessageFilter::UninitializeInSequence() { |
| 42 // TODO(michaeln): Restore this DCHECK once crbug/166470 and crbug/164403 | 42 // TODO(michaeln): Restore this DCHECK once crbug/166470 and crbug/164403 |
| 43 // are resolved. | 43 // are resolved. |
| 44 // DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); | 44 // DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 45 context_->RemoveEventObserver(this); | 45 context_->RemoveEventObserver(this); |
| 46 host_.reset(); | 46 host_.reset(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void DOMStorageMessageFilter::OnFilterAdded(IPC::Sender* sender) { | 49 void DOMStorageMessageFilter::OnFilterAdded(IPC::Channel* channel) { |
| 50 context_->task_runner()->PostShutdownBlockingTask( | 50 context_->task_runner()->PostShutdownBlockingTask( |
| 51 FROM_HERE, | 51 FROM_HERE, |
| 52 DOMStorageTaskRunner::PRIMARY_SEQUENCE, | 52 DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
| 53 base::Bind(&DOMStorageMessageFilter::InitializeInSequence, this)); | 53 base::Bind(&DOMStorageMessageFilter::InitializeInSequence, this)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void DOMStorageMessageFilter::OnFilterRemoved() { | 56 void DOMStorageMessageFilter::OnFilterRemoved() { |
| 57 context_->task_runner()->PostShutdownBlockingTask( | 57 context_->task_runner()->PostShutdownBlockingTask( |
| 58 FROM_HERE, | 58 FROM_HERE, |
| 59 DOMStorageTaskRunner::PRIMARY_SEQUENCE, | 59 DOMStorageTaskRunner::PRIMARY_SEQUENCE, |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 params.connection_id = connection_dispatching_message_for_; | 200 params.connection_id = connection_dispatching_message_for_; |
| 201 params.key = key; | 201 params.key = key; |
| 202 params.new_value = new_value; | 202 params.new_value = new_value; |
| 203 params.old_value = old_value; | 203 params.old_value = old_value; |
| 204 params.namespace_id = area->namespace_id(); | 204 params.namespace_id = area->namespace_id(); |
| 205 Send(new DOMStorageMsg_Event(params)); | 205 Send(new DOMStorageMsg_Event(params)); |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace content | 209 } // namespace content |
| OLD | NEW |