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

Side by Side Diff: mojo/shell/tests/application_manager_apptest.cc

Issue 1719193003: Add a user id parameter to connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 unified diff | Download patch
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 20 matching lines...) Expand all
31 public: 31 public:
32 ApplicationManagerAppTestDelegate() 32 ApplicationManagerAppTestDelegate()
33 : target_id_(mojom::Shell::kInvalidApplicationID), 33 : target_id_(mojom::Shell::kInvalidApplicationID),
34 binding_(this) {} 34 binding_(this) {}
35 ~ApplicationManagerAppTestDelegate() override {} 35 ~ApplicationManagerAppTestDelegate() override {}
36 36
37 uint32_t target_id() const { return target_id_; } 37 uint32_t target_id() const { return target_id_; }
38 38
39 private: 39 private:
40 // mojo::ShellClient: 40 // mojo::ShellClient:
41 void Initialize(Shell* shell, const std::string& url, uint32_t id) override {} 41 void Initialize(Shell* shell, const std::string& url, uint32_t id,
42 uint32_t user_id) override {}
42 bool AcceptConnection(Connection* connection) override { 43 bool AcceptConnection(Connection* connection) override {
43 connection->AddInterface<CreateInstanceForHandleTest>(this); 44 connection->AddInterface<CreateInstanceForHandleTest>(this);
44 return true; 45 return true;
45 } 46 }
46 47
47 // InterfaceFactory<CreateInstanceForHandleTest>: 48 // InterfaceFactory<CreateInstanceForHandleTest>:
48 void Create(Connection* connection, 49 void Create(Connection* connection,
49 InterfaceRequest<CreateInstanceForHandleTest> request) override { 50 InterfaceRequest<CreateInstanceForHandleTest> request) override {
50 binding_.Bind(std::move(request)); 51 binding_.Bind(std::move(request));
51 } 52 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 204
204 driver.set_connection_error_handler( 205 driver.set_connection_error_handler(
205 base::Bind(&ApplicationManagerAppTest::OnDriverQuit, 206 base::Bind(&ApplicationManagerAppTest::OnDriverQuit,
206 base::Unretained(this))); 207 base::Unretained(this)));
207 driver->QuitDriver(); 208 driver->QuitDriver();
208 base::MessageLoop::current()->Run(); 209 base::MessageLoop::current()->Run();
209 } 210 }
210 211
211 } // namespace shell 212 } // namespace shell
212 } // namespace mojo 213 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/standalone/context.cc ('k') | mojo/shell/tests/application_manager_apptest_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698