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

Side by Side Diff: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc

Issue 3940002: Use scoped_refptr for refcounted param in DomStorageDispatcherHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/in_process_webkit/dom_storage_dispatcher_host.h" 5 #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h"
6 6
7 #include "base/nullable_string16.h" 7 #include "base/nullable_string16.h"
8 #include "chrome/browser/browser_thread.h" 8 #include "chrome/browser/browser_thread.h"
9 #include "chrome/browser/in_process_webkit/dom_storage_area.h" 9 #include "chrome/browser/in_process_webkit/dom_storage_area.h"
10 #include "chrome/browser/in_process_webkit/dom_storage_context.h" 10 #include "chrome/browser/in_process_webkit/dom_storage_context.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 void DOMStorageDispatcherHost::OnStorageAreaId(int64 namespace_id, 148 void DOMStorageDispatcherHost::OnStorageAreaId(int64 namespace_id,
149 const string16& origin, 149 const string16& origin,
150 IPC::Message* reply_msg) { 150 IPC::Message* reply_msg) {
151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
152 ChromeURLRequestContext* url_request_context = 152 ChromeURLRequestContext* url_request_context =
153 resource_message_filter_->GetRequestContextForURL(GURL(origin)); 153 resource_message_filter_->GetRequestContextForURL(GURL(origin));
154 BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod( 154 BrowserThread::PostTask(BrowserThread::WEBKIT, FROM_HERE, NewRunnableMethod(
155 this, &DOMStorageDispatcherHost::OnStorageAreaIdWebKit, namespace_id, 155 this, &DOMStorageDispatcherHost::OnStorageAreaIdWebKit, namespace_id,
156 origin, reply_msg, url_request_context->host_content_settings_map())); 156 origin, reply_msg,
157 make_scoped_refptr(url_request_context->host_content_settings_map())));
157 } 158 }
158 159
159 void DOMStorageDispatcherHost::OnStorageAreaIdWebKit( 160 void DOMStorageDispatcherHost::OnStorageAreaIdWebKit(
160 int64 namespace_id, const string16& origin, IPC::Message* reply_msg, 161 int64 namespace_id, const string16& origin, IPC::Message* reply_msg,
161 HostContentSettingsMap* host_content_settings_map) { 162 HostContentSettingsMap* host_content_settings_map) {
162 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); 163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
163 DOMStorageNamespace* storage_namespace = 164 DOMStorageNamespace* storage_namespace =
164 Context()->GetStorageNamespace(namespace_id, true); 165 Context()->GetStorageNamespace(namespace_id, true);
165 if (!storage_namespace) { 166 if (!storage_namespace) {
166 BrowserRenderProcessHost::BadMessageTerminateProcess( 167 BrowserRenderProcessHost::BadMessageTerminateProcess(
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 const DOMStorageContext::DispatcherHostSet* set = 332 const DOMStorageContext::DispatcherHostSet* set =
332 Context()->GetDispatcherHostSet(); 333 Context()->GetDispatcherHostSet();
333 DOMStorageContext::DispatcherHostSet::const_iterator cur = set->begin(); 334 DOMStorageContext::DispatcherHostSet::const_iterator cur = set->begin();
334 while (cur != set->end()) { 335 while (cur != set->end()) {
335 // The renderer that generates the event handles it itself. 336 // The renderer that generates the event handles it itself.
336 if (*cur != this) 337 if (*cur != this)
337 (*cur)->Send(new ViewMsg_DOMStorageEvent(params)); 338 (*cur)->Send(new ViewMsg_DOMStorageEvent(params));
338 ++cur; 339 ++cur;
339 } 340 }
340 } 341 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698