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

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

Issue 2264543003: Adds sync brokering to Windows EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 3 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') | content/test/BUILD.gn » ('j') | 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 daec25c93759c18856fe302ea496afd878f8be18..5eb2dadfc436bade33b820351fc35dc816f1f54b 100644
--- a/content/shell/utility/shell_content_utility_client.cc
+++ b/content/shell/utility/shell_content_utility_client.cc
@@ -13,6 +13,7 @@
#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"
+#include "mojo/public/cpp/system/buffer.h"
#include "services/shell/public/cpp/interface_registry.h"
namespace content {
@@ -45,6 +46,20 @@ class TestMojoServiceImpl : public mojom::TestMojoService {
NOTREACHED();
}
+ void CreateSharedBuffer(const std::string& message,
+ const CreateSharedBufferCallback& callback) override {
+ mojo::ScopedSharedBufferHandle buffer =
+ mojo::SharedBufferHandle::Create(message.size());
+ CHECK(buffer.is_valid());
+
+ mojo::ScopedSharedBufferMapping mapping = buffer->Map(message.size());
+ CHECK(mapping);
+ std::copy(message.begin(), message.end(),
+ reinterpret_cast<char*>(mapping.get()));
+
+ callback.Run(std::move(buffer));
+ }
+
private:
explicit TestMojoServiceImpl() {}
« no previous file with comments | « content/shell/renderer/shell_content_renderer_client.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698