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

Unified Diff: extensions/test/test_content_browser_client.cc

Issue 2697463002: Convert utility process extension Unpacker IPC to mojo (Closed)
Patch Set: Set the IPC enum traits limit to extensions::Manifest::NUM_LOCATIONS - 1. Created 3 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 | « extensions/test/test_content_browser_client.h ('k') | extensions/test/test_content_utility_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/test/test_content_browser_client.cc
diff --git a/extensions/test/test_content_browser_client.cc b/extensions/test/test_content_browser_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4b83f11433350965071d8e793fa4b30170a70c75
--- /dev/null
+++ b/extensions/test/test_content_browser_client.cc
@@ -0,0 +1,37 @@
+// Copyright 2017 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 "extensions/test/test_content_browser_client.h"
+
+#include "base/files/file_util.h"
+#include "base/json/json_reader.h"
+#include "base/path_service.h"
+#include "base/values.h"
+#include "content/public/common/service_names.mojom.h"
+#include "extensions/common/extension_paths.h"
+
+namespace extensions {
+
+TestContentBrowserClient::TestContentBrowserClient() = default;
+
+TestContentBrowserClient::~TestContentBrowserClient() = default;
+
+std::unique_ptr<base::Value>
+TestContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
+ if (name != content::mojom::kUtilityServiceName)
+ return nullptr;
+
+ base::FilePath extensions_test_data_dir;
+ CHECK(base::PathService::Get(DIR_TEST_DATA, &extensions_test_data_dir));
+
+ std::string contents;
+ CHECK(base::ReadFileToString(
+ extensions_test_data_dir.AppendASCII(
+ "extensions_test_content_utility_manifest_overlay.json"),
+ &contents));
+
+ return base::JSONReader::Read(contents);
+}
+
+} // namespace extensions
« no previous file with comments | « extensions/test/test_content_browser_client.h ('k') | extensions/test/test_content_utility_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698