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

Unified Diff: content/shell/utility/shell_content_utility_client.cc

Issue 2049303002: Add the UtilityProcessMojoClient class and convert SafeJsonParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed android sandbox browser tests 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
« no previous file with comments | « content/shell/renderer/shell_content_renderer_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/utility/shell_content_utility_client.cc
diff --git a/content/shell/utility/shell_content_utility_client.cc b/content/shell/utility/shell_content_utility_client.cc
index 0ed0358579857e00e2cdda857aea3819105e7ac5..4200576503f5781ad290b77457a1dd56a072ed1f 100644
--- a/content/shell/utility/shell_content_utility_client.cc
+++ b/content/shell/utility/shell_content_utility_client.cc
@@ -8,8 +8,11 @@
#include <utility>
#include "base/bind.h"
+#include "base/files/scoped_temp_dir.h"
+#include "base/process/process.h"
#include "content/public/common/service_registry.h"
#include "content/public/test/test_mojo_app.h"
+#include "content/public/test/test_mojo_service.mojom.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
namespace content {
@@ -27,6 +30,16 @@ class TestMojoServiceImpl : public mojom::TestMojoService {
callback.Run();
}
+ void DoTerminateProcess(const DoTerminateProcessCallback& callback) override {
+ base::Process::Current().Terminate(0, false);
+ }
+
+ void CreateFolder(const CreateFolderCallback& callback) override {
+ // Note: This is used to check if the sandbox is disabled or not since
+ // creating a folder is forbidden when it is enabled.
+ callback.Run(base::ScopedTempDir().CreateUniqueTempDir());
+ }
+
void GetRequestorName(const GetRequestorNameCallback& callback) override {
NOTREACHED();
}
« no previous file with comments | « content/shell/renderer/shell_content_renderer_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698