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

Unified Diff: services/python/content_handler/content_handler_main.cc

Issue 901203002: Move python content handler to //services/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « services/python/content_handler/c_base.pxd ('k') | services/python/content_handler/mojo_system_impl.pyx » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/python/content_handler/content_handler_main.cc
diff --git a/mojo/python/content_handler/content_handler_main.cc b/services/python/content_handler/content_handler_main.cc
similarity index 92%
rename from mojo/python/content_handler/content_handler_main.cc
rename to services/python/content_handler/content_handler_main.cc
index 30e5175b073ceaa35ab990373e30f59544af234f..c1ecc0befdb2fe96425126aac22fe4dc125d9486 100644
--- a/mojo/python/content_handler/content_handler_main.cc
+++ b/services/python/content_handler/content_handler_main.cc
@@ -28,8 +28,18 @@ extern "C" {
void initmojo_system_impl();
}
-namespace mojo {
+namespace services {
namespace python {
+namespace content_handler {
+
+using mojo::Application;
+using mojo::ApplicationConnection;
+using mojo::ApplicationDelegate;
+using mojo::ContentHandlerFactory;
+using mojo::InterfaceRequest;
+using mojo::ScopedDataPipeConsumerHandle;
+using mojo::URLResponsePtr;
+using mojo::python::ScopedPyRef;
class PythonContentHandler : public ApplicationDelegate,
public ContentHandlerFactory::Delegate {
@@ -160,7 +170,7 @@ class PythonContentHandler : public ApplicationDelegate,
std::string CopyToString(ScopedDataPipeConsumerHandle body) {
std::string body_str;
- bool result = common::BlockingCopyToString(body.Pass(), &body_str);
+ bool result = mojo::common::BlockingCopyToString(body.Pass(), &body_str);
DCHECK(result);
return body_str;
}
@@ -170,11 +180,12 @@ class PythonContentHandler : public ApplicationDelegate,
DISALLOW_COPY_AND_ASSIGN(PythonContentHandler);
};
+} // namespace content_handler
} // namespace python
-} // namespace mojo
+} // namespace services
MojoResult MojoMain(MojoHandle shell_handle) {
mojo::ApplicationRunnerChromium runner(
- new mojo::python::PythonContentHandler());
+ new services::python::content_handler::PythonContentHandler());
return runner.Run(shell_handle);
}
« no previous file with comments | « services/python/content_handler/c_base.pxd ('k') | services/python/content_handler/mojo_system_impl.pyx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698