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

Unified Diff: content/child/web_discardable_memory_impl.cc

Issue 1787973002: Replace blink::WebDiscardableMemory with base::DiscardableMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use StringPiece::as_string 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/web_discardable_memory_impl.h ('k') | content/content_child.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_discardable_memory_impl.cc
diff --git a/content/child/web_discardable_memory_impl.cc b/content/child/web_discardable_memory_impl.cc
deleted file mode 100644
index b2cdd205d5ad36386f1eb43d1a46546df27588a6..0000000000000000000000000000000000000000
--- a/content/child/web_discardable_memory_impl.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/child/web_discardable_memory_impl.h"
-
-#include <utility>
-
-#include "base/memory/discardable_memory.h"
-#include "base/memory/discardable_memory_allocator.h"
-#include "third_party/WebKit/public/platform/WebProcessMemoryDump.h"
-#include "third_party/WebKit/public/platform/WebString.h"
-
-namespace content {
-
-WebDiscardableMemoryImpl::~WebDiscardableMemoryImpl() {}
-
-// static
-scoped_ptr<WebDiscardableMemoryImpl>
-WebDiscardableMemoryImpl::CreateLockedMemory(size_t size) {
- return make_scoped_ptr(new WebDiscardableMemoryImpl(
- base::DiscardableMemoryAllocator::GetInstance()
- ->AllocateLockedDiscardableMemory(size)));
-}
-
-bool WebDiscardableMemoryImpl::lock() {
- return discardable_->Lock();
-}
-
-void WebDiscardableMemoryImpl::unlock() {
- discardable_->Unlock();
-}
-
-void* WebDiscardableMemoryImpl::data() {
- return discardable_->data();
-}
-
-blink::WebMemoryAllocatorDump*
-WebDiscardableMemoryImpl::createMemoryAllocatorDump(
- const blink::WebString& name,
- blink::WebProcessMemoryDump* wpmd) const {
- return wpmd->createDiscardableMemoryAllocatorDump(
- name.utf8(), discardable_.get());
-}
-
-WebDiscardableMemoryImpl::WebDiscardableMemoryImpl(
- scoped_ptr<base::DiscardableMemory> memory)
- : discardable_(std::move(memory)) {}
-
-} // namespace content
« no previous file with comments | « content/child/web_discardable_memory_impl.h ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698