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

Unified Diff: components/filesystem/main.cc

Issue 1147083002: mandoline: Fork the files service from the mojo repository. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: I think the problem was in the mandoline build.gn Created 5 years, 7 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 | « components/filesystem/futimens_android.cc ('k') | components/filesystem/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/main.cc
diff --git a/components/filesystem/main.cc b/components/filesystem/main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..82e90039e570870fabb4aae73675cdca5fde92d9
--- /dev/null
+++ b/components/filesystem/main.cc
@@ -0,0 +1,44 @@
+// Copyright 2015 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 "base/macros.h"
+#include "components/filesystem/files_impl.h"
+#include "components/filesystem/public/interfaces/files.mojom.h"
+#include "mojo/application/public/cpp/application_connection.h"
+#include "mojo/application/public/cpp/application_delegate.h"
+#include "mojo/application/public/cpp/application_runner.h"
+#include "mojo/application/public/cpp/interface_factory.h"
+#include "mojo/public/c/system/main.h"
+
+namespace mojo {
+namespace files {
+
+class FilesApp : public ApplicationDelegate, public InterfaceFactory<Files> {
+ public:
+ FilesApp() {}
+ ~FilesApp() override {}
+
+ private:
+ // |ApplicationDelegate| override:
+ bool ConfigureIncomingConnection(ApplicationConnection* connection) override {
+ connection->AddService<Files>(this);
+ return true;
+ }
+
+ // |InterfaceFactory<Files>| implementation:
+ void Create(ApplicationConnection* connection,
+ InterfaceRequest<Files> request) override {
+ new FilesImpl(connection, request.Pass());
+ }
+
+ DISALLOW_COPY_AND_ASSIGN(FilesApp);
+};
+
+} // namespace files
+} // namespace mojo
+
+MojoResult MojoMain(MojoHandle application_request) {
+ mojo::ApplicationRunner runner(new mojo::files::FilesApp());
+ return runner.Run(application_request);
+}
« no previous file with comments | « components/filesystem/futimens_android.cc ('k') | components/filesystem/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698