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

Unified Diff: third_party/WebKit/Source/platform/exported/Platform.cpp

Issue 2043753002: Declarative resource hints go through mojo IPC to //content Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove gmocking + add another browser test Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/exported/Platform.cpp
diff --git a/third_party/WebKit/Source/platform/exported/Platform.cpp b/third_party/WebKit/Source/platform/exported/Platform.cpp
index c0f50a0aa51aa5320309ec6276536c5bc4ae9e18..1ca8773830fd2900a99da4391382ad6386b42e6f 100644
--- a/third_party/WebKit/Source/platform/exported/Platform.cpp
+++ b/third_party/WebKit/Source/platform/exported/Platform.cpp
@@ -33,12 +33,14 @@
#include "platform/Histogram.h"
#include "platform/MemoryCacheDumpProvider.h"
#include "platform/PartitionAllocMemoryDumpProvider.h"
+#include "platform/PlatformMojoServices.h"
#include "platform/fonts/FontCacheMemoryDumpProvider.h"
#include "platform/heap/BlinkGCMemoryDumpProvider.h"
#include "platform/heap/GCTaskRunner.h"
#include "public/platform/Platform.h"
#include "public/platform/ServiceRegistry.h"
#include "public/platform/WebPrerenderingSupport.h"
+#include "public/platform/WebPrescientNetworking.h"
#include "wtf/HashMap.h"
namespace blink {
@@ -52,6 +54,8 @@ Platform::Platform()
{
}
+Platform::~Platform() = default;
+
static void maxObservedSizeFunction(size_t sizeInMB)
{
const size_t supportedMaxSizeInMB = 4 * 1024;
@@ -93,11 +97,13 @@ void Platform::initialize(Platform* platform)
base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(FontCacheMemoryDumpProvider::instance(), "FontCaches", base::ThreadTaskRunnerHandle::Get());
base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(MemoryCacheDumpProvider::instance(), "MemoryCache", base::ThreadTaskRunnerHandle::Get());
}
+ s_platform->m_mojoServices.reset(new PlatformMojoServices);
}
void Platform::shutdown()
{
ASSERT(isMainThread());
+ s_platform->m_mojoServices.reset();
if (s_platform->m_mainThread) {
base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(FontCacheMemoryDumpProvider::instance());
base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(PartitionAllocMemoryDumpProvider::instance());
@@ -144,4 +150,9 @@ ServiceRegistry* Platform::serviceRegistry()
return ServiceRegistry::getEmptyServiceRegistry();
}
+PlatformMojoServices* Platform::mojoServices()
+{
+ return m_mojoServices.get();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698