Chromium Code Reviews

Side by Side Diff: examples/bank_app/customer.cc

Issue 1391243003: Move //mojo/services/X/public/... to //mojo/services/X/... (part 4). (Closed) Base URL: https://github.com/domokit/mojo.git@no_public_3-x-no_public_2-x-no_public_1
Patch Set: copyright header Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « examples/bank_app/bank.cc ('k') | examples/bitmap_uploader/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "examples/bank_app/bank.mojom.h" 7 #include "examples/bank_app/bank.mojom.h"
8 #include "mojo/public/c/system/main.h" 8 #include "mojo/public/c/system/main.h"
9 #include "mojo/public/cpp/application/application_impl.h" 9 #include "mojo/public/cpp/application/application_impl.h"
10 #include "mojo/public/cpp/application/application_runner.h" 10 #include "mojo/public/cpp/application/application_runner.h"
11 #include "mojo/public/cpp/utility/run_loop.h" 11 #include "mojo/public/cpp/utility/run_loop.h"
12 #include "mojo/services/vanadium/security/public/interfaces/principal.mojom.h" 12 #include "mojo/services/vanadium/security/interfaces/principal.mojom.h"
13 13
14 namespace examples { 14 namespace examples {
15 15
16 class LoginHandler { 16 class LoginHandler {
17 public: 17 public:
18 void Run(const vanadium::BlessingPtr& b) const { 18 void Run(const vanadium::BlessingPtr& b) const {
19 std::string user; 19 std::string user;
20 if (b && b->chain.size() > 0) { 20 if (b && b->chain.size() > 0) {
21 user = b->chain[0]->extension; 21 user = b->chain[0]->extension;
22 for (size_t i = 1; i < b->chain.size(); i++) { 22 for (size_t i = 1; i < b->chain.size(); i++) {
(...skipping 33 matching lines...)
56 private: 56 private:
57 vanadium::PrincipalServicePtr login_service_; 57 vanadium::PrincipalServicePtr login_service_;
58 }; 58 };
59 59
60 } // namespace examples 60 } // namespace examples
61 61
62 MojoResult MojoMain(MojoHandle application_request) { 62 MojoResult MojoMain(MojoHandle application_request) {
63 mojo::ApplicationRunner runner(new examples::BankCustomer); 63 mojo::ApplicationRunner runner(new examples::BankCustomer);
64 return runner.Run(application_request); 64 return runner.Run(application_request);
65 } 65 }
OLDNEW
« no previous file with comments | « examples/bank_app/bank.cc ('k') | examples/bitmap_uploader/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine