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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "extensions/test/test_content_browser_client.h"
6
7 #include "base/files/file_util.h"
8 #include "base/json/json_reader.h"
9 #include "base/path_service.h"
10 #include "base/values.h"
11 #include "content/public/common/service_names.mojom.h"
12 #include "extensions/common/extension_paths.h"
13
14 namespace extensions {
15
16 TestContentBrowserClient::TestContentBrowserClient() = default;
17
18 TestContentBrowserClient::~TestContentBrowserClient() = default;
19
20 std::unique_ptr<base::Value>
21 TestContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
22 if (name != content::mojom::kUtilityServiceName)
23 return nullptr;
24
25 base::FilePath extensions_test_data_dir;
26 CHECK(base::PathService::Get(DIR_TEST_DATA, &extensions_test_data_dir));
27
28 std::string contents;
29 CHECK(base::ReadFileToString(
30 extensions_test_data_dir.AppendASCII(
31 "extensions_test_content_utility_manifest_overlay.json"),
32 &contents));
33
34 return base::JSONReader::Read(contents);
35 }
36
37 } // namespace extensions
OLDNEW
« 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