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

Side by Side Diff: content/browser/in_process_webkit/dom_storage_message_filter.cc

Issue 7074022: Get rid of the render view id in localStorage IPCs as it's not used anymore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/in_process_webkit/dom_storage_message_filter.h" 5 #include "content/browser/in_process_webkit/dom_storage_message_filter.h"
6 6
7 #include "base/nullable_string16.h" 7 #include "base/nullable_string16.h"
8 #include "content/browser/browser_thread.h" 8 #include "content/browser/browser_thread.h"
9 #include "content/browser/in_process_webkit/dom_storage_area.h" 9 #include "content/browser/in_process_webkit/dom_storage_area.h"
10 #include "content/browser/in_process_webkit/dom_storage_context.h" 10 #include "content/browser/in_process_webkit/dom_storage_context.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); 150 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
151 DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id); 151 DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id);
152 if (!storage_area) { 152 if (!storage_area) {
153 *value = NullableString16(true); 153 *value = NullableString16(true);
154 } else { 154 } else {
155 *value = storage_area->GetItem(key); 155 *value = storage_area->GetItem(key);
156 } 156 }
157 } 157 }
158 158
159 void DOMStorageMessageFilter::OnSetItem( 159 void DOMStorageMessageFilter::OnSetItem(
160 int render_view_id, int64 storage_area_id, const string16& key, 160 int64 storage_area_id, const string16& key,
161 const string16& value, const GURL& url, 161 const string16& value, const GURL& url,
162 WebKit::WebStorageArea::Result* result, NullableString16* old_value) { 162 WebKit::WebStorageArea::Result* result, NullableString16* old_value) {
163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); 163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
164 DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id); 164 DOMStorageArea* storage_area = Context()->GetStorageArea(storage_area_id);
165 if (!storage_area) { 165 if (!storage_area) {
166 *old_value = NullableString16(true); 166 *old_value = NullableString16(true);
167 *result = WebKit::WebStorageArea::ResultOK; 167 *result = WebKit::WebStorageArea::ResultOK;
168 return; 168 return;
169 } 169 }
170 170
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 const DOMStorageContext::MessageFilterSet* set = 205 const DOMStorageContext::MessageFilterSet* set =
206 Context()->GetMessageFilterSet(); 206 Context()->GetMessageFilterSet();
207 DOMStorageContext::MessageFilterSet::const_iterator cur = set->begin(); 207 DOMStorageContext::MessageFilterSet::const_iterator cur = set->begin();
208 while (cur != set->end()) { 208 while (cur != set->end()) {
209 // The renderer that generates the event handles it itself. 209 // The renderer that generates the event handles it itself.
210 if (*cur != this) 210 if (*cur != this)
211 (*cur)->Send(new DOMStorageMsg_Event(params)); 211 (*cur)->Send(new DOMStorageMsg_Event(params));
212 ++cur; 212 ++cur;
213 } 213 }
214 } 214 }
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/dom_storage_message_filter.h ('k') | content/common/dom_storage_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698