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

Side by Side Diff: mojo/shell/tests/application_manager_apptest_driver.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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 29 matching lines...) Expand all
40 class TargetApplicationDelegate : public mojo::ShellClient, 40 class TargetApplicationDelegate : public mojo::ShellClient,
41 public mojo::InterfaceFactory<Driver>, 41 public mojo::InterfaceFactory<Driver>,
42 public Driver { 42 public Driver {
43 public: 43 public:
44 TargetApplicationDelegate() : shell_(nullptr), weak_factory_(this) {} 44 TargetApplicationDelegate() : shell_(nullptr), weak_factory_(this) {}
45 ~TargetApplicationDelegate() override {} 45 ~TargetApplicationDelegate() override {}
46 46
47 private: 47 private:
48 // mojo::ShellClient: 48 // mojo::ShellClient:
49 void Initialize(mojo::Shell* shell, const std::string& url, 49 void Initialize(mojo::Shell* shell, const std::string& url,
50 uint32_t id) override { 50 uint32_t id, uint32_t user_id) override {
51 shell_ = shell; 51 shell_ = shell;
52 52
53 base::FilePath target_path; 53 base::FilePath target_path;
54 CHECK(base::PathService::Get(base::DIR_EXE, &target_path)); 54 CHECK(base::PathService::Get(base::DIR_EXE, &target_path));
55 #if defined(OS_WIN) 55 #if defined(OS_WIN)
56 target_path = target_path.Append( 56 target_path = target_path.Append(
57 FILE_PATH_LITERAL("application_manager_apptest_target.exe")); 57 FILE_PATH_LITERAL("application_manager_apptest_target.exe"));
58 #else 58 #else
59 target_path = target_path.Append( 59 target_path = target_path.Append(
60 FILE_PATH_LITERAL("application_manager_apptest_target")); 60 FILE_PATH_LITERAL("application_manager_apptest_target"));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 int main(int argc, char** argv) { 147 int main(int argc, char** argv) {
148 base::AtExitManager at_exit; 148 base::AtExitManager at_exit;
149 base::CommandLine::Init(argc, argv); 149 base::CommandLine::Init(argc, argv);
150 150
151 mojo::shell::InitializeLogging(); 151 mojo::shell::InitializeLogging();
152 152
153 TargetApplicationDelegate delegate; 153 TargetApplicationDelegate delegate;
154 return mojo::shell::TestNativeMain(&delegate); 154 return mojo::shell::TestNativeMain(&delegate);
155 } 155 }
OLDNEW
« no previous file with comments | « mojo/shell/tests/application_manager_apptest.cc ('k') | mojo/shell/tests/application_manager_apptest_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698