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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 2847013002: Switch to mojo localstorage backend by default. (Closed)
Patch Set: rebase Created 3 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
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/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 return; 459 return;
460 } 460 }
461 461
462 RenderThread* thread = RenderThread::Get(); 462 RenderThread* thread = RenderThread::Get();
463 if (thread) // NULL in unittests. 463 if (thread) // NULL in unittests.
464 thread->Send(new RenderProcessHostMsg_SuddenTerminationChanged(enabled)); 464 thread->Send(new RenderProcessHostMsg_SuddenTerminationChanged(enabled));
465 } 465 }
466 466
467 std::unique_ptr<WebStorageNamespace> 467 std::unique_ptr<WebStorageNamespace>
468 RendererBlinkPlatformImpl::CreateLocalStorageNamespace() { 468 RendererBlinkPlatformImpl::CreateLocalStorageNamespace() {
469 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 469 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
470 switches::kMojoLocalStorage)) { 470 switches::kDisableMojoLocalStorage)) {
471 if (!local_storage_cached_areas_) { 471 if (!local_storage_cached_areas_) {
472 local_storage_cached_areas_.reset(new LocalStorageCachedAreas( 472 local_storage_cached_areas_.reset(new LocalStorageCachedAreas(
473 RenderThreadImpl::current()->GetStoragePartitionService())); 473 RenderThreadImpl::current()->GetStoragePartitionService()));
474 } 474 }
475 return base::MakeUnique<LocalStorageNamespace>( 475 return base::MakeUnique<LocalStorageNamespace>(
476 local_storage_cached_areas_.get()); 476 local_storage_cached_areas_.get());
477 } 477 }
478 478
479 return base::MakeUnique<WebStorageNamespaceImpl>(); 479 return base::MakeUnique<WebStorageNamespaceImpl>();
480 } 480 }
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 //------------------------------------------------------------------------------ 1281 //------------------------------------------------------------------------------
1282 void RendererBlinkPlatformImpl::RequestPurgeMemory() { 1282 void RendererBlinkPlatformImpl::RequestPurgeMemory() {
1283 // TODO(tasak|bashi): We should use ChildMemoryCoordinator here, but 1283 // TODO(tasak|bashi): We should use ChildMemoryCoordinator here, but
1284 // ChildMemoryCoordinator isn't always available as it's only initialized 1284 // ChildMemoryCoordinator isn't always available as it's only initialized
1285 // when kMemoryCoordinatorV0 is enabled. 1285 // when kMemoryCoordinatorV0 is enabled.
1286 // Use ChildMemoryCoordinator when memory coordinator is always enabled. 1286 // Use ChildMemoryCoordinator when memory coordinator is always enabled.
1287 base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); 1287 base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
1288 } 1288 }
1289 1289
1290 } // namespace content 1290 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698