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

Side by Side Diff: components/resource_provider/resource_provider_test_app.cc

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
Patch Set: . Created 4 years, 8 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
11 #include "components/resource_provider/public/cpp/resource_loader.h" 11 #include "components/resource_provider/public/cpp/resource_loader.h"
12 #include "components/resource_provider/public/interfaces/resource_provider.mojom .h" 12 #include "components/resource_provider/public/interfaces/resource_provider.mojom .h"
13 #include "components/resource_provider/test.mojom.h" 13 #include "components/resource_provider/test.mojom.h"
14 #include "mojo/platform_handle/platform_handle_functions.h" 14 #include "mojo/platform_handle/platform_handle_functions.h"
15 #include "mojo/public/c/system/main.h" 15 #include "mojo/public/c/system/main.h"
16 #include "mojo/public/cpp/bindings/array.h" 16 #include "mojo/public/cpp/bindings/array.h"
17 #include "mojo/public/cpp/bindings/binding_set.h" 17 #include "mojo/public/cpp/bindings/binding_set.h"
18 #include "mojo/shell/public/cpp/application_runner.h" 18 #include "services/shell/public/cpp/application_runner.h"
19 #include "mojo/shell/public/cpp/shell_client.h" 19 #include "services/shell/public/cpp/shell_client.h"
20 20
21 namespace resource_provider { 21 namespace resource_provider {
22 namespace test { 22 namespace test {
23 23
24 std::string ReadFile(base::File* file) { 24 std::string ReadFile(base::File* file) {
25 const size_t kBufferSize = 1 << 16; 25 const size_t kBufferSize = 1 << 16;
26 scoped_ptr<char[]> buffer(new char[kBufferSize]); 26 scoped_ptr<char[]> buffer(new char[kBufferSize]);
27 const int read = file->ReadAtCurrentPos(buffer.get(), kBufferSize); 27 const int read = file->ReadAtCurrentPos(buffer.get(), kBufferSize);
28 if (read == -1) 28 if (read == -1)
29 return std::string(); 29 return std::string();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 DISALLOW_COPY_AND_ASSIGN(TestApp); 114 DISALLOW_COPY_AND_ASSIGN(TestApp);
115 }; 115 };
116 116
117 } // namespace test 117 } // namespace test
118 } // namespace resource_provider 118 } // namespace resource_provider
119 119
120 MojoResult MojoMain(MojoHandle shell_handle) { 120 MojoResult MojoMain(MojoHandle shell_handle) {
121 return mojo::ApplicationRunner(new resource_provider::test::TestApp) 121 return mojo::ApplicationRunner(new resource_provider::test::TestApp)
122 .Run(shell_handle); 122 .Run(shell_handle);
123 } 123 }
OLDNEW
« no previous file with comments | « components/resource_provider/resource_provider_app.cc ('k') | components/resource_provider/resource_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698