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

Side by Side Diff: content/renderer/dom_storage/dom_storage_dispatcher.cc

Issue 1821413003: Remove logic for lazy initialization of WebKit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 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
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 "content/renderer/dom_storage/dom_storage_dispatcher.h" 5 #include "content/renderer/dom_storage/dom_storage_dispatcher.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 IPC_MESSAGE_HANDLER(DOMStorageMsg_Event, OnStorageEvent) 292 IPC_MESSAGE_HANDLER(DOMStorageMsg_Event, OnStorageEvent)
293 IPC_MESSAGE_HANDLER(DOMStorageMsg_AsyncOperationComplete, 293 IPC_MESSAGE_HANDLER(DOMStorageMsg_AsyncOperationComplete,
294 OnAsyncOperationComplete) 294 OnAsyncOperationComplete)
295 IPC_MESSAGE_UNHANDLED(handled = false) 295 IPC_MESSAGE_UNHANDLED(handled = false)
296 IPC_END_MESSAGE_MAP() 296 IPC_END_MESSAGE_MAP()
297 return handled; 297 return handled;
298 } 298 }
299 299
300 void DomStorageDispatcher::OnStorageEvent( 300 void DomStorageDispatcher::OnStorageEvent(
301 const DOMStorageMsg_Event_Params& params) { 301 const DOMStorageMsg_Event_Params& params) {
302 RenderThreadImpl::current()->EnsureWebKitInitialized();
303
304 WebStorageAreaImpl* originating_area = NULL; 302 WebStorageAreaImpl* originating_area = NULL;
305 if (params.connection_id) { 303 if (params.connection_id) {
306 originating_area = WebStorageAreaImpl::FromConnectionId( 304 originating_area = WebStorageAreaImpl::FromConnectionId(
307 params.connection_id); 305 params.connection_id);
308 } else { 306 } else {
309 DOMStorageCachedArea* cached_area = proxy_->LookupCachedArea( 307 DOMStorageCachedArea* cached_area = proxy_->LookupCachedArea(
310 params.namespace_id, params.origin); 308 params.namespace_id, params.origin);
311 if (cached_area) 309 if (cached_area)
312 cached_area->ApplyMutation(params.key, params.new_value); 310 cached_area->ApplyMutation(params.key, params.new_value);
313 } 311 }
(...skipping 18 matching lines...) Expand all
332 session_namespace_for_event_dispatch, 330 session_namespace_for_event_dispatch,
333 originating_area); 331 originating_area);
334 } 332 }
335 } 333 }
336 334
337 void DomStorageDispatcher::OnAsyncOperationComplete(bool success) { 335 void DomStorageDispatcher::OnAsyncOperationComplete(bool success) {
338 proxy_->CompleteOnePendingCallback(success); 336 proxy_->CompleteOnePendingCallback(success);
339 } 337 }
340 338
341 } // namespace content 339 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698