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

Side by Side Diff: content/common/mojo/mojo_shell_connection_impl.cc

Issue 1770533002: Change userid from a uint32_t to a string guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@33connector
Patch Set: . Created 4 years, 9 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 "content/common/mojo/mojo_shell_connection_impl.h" 5 #include "content/common/mojo/mojo_shell_connection_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 delete this; 89 delete this;
90 lazy_tls_ptr.Pointer()->Set(nullptr); 90 lazy_tls_ptr.Pointer()->Set(nullptr);
91 return; 91 return;
92 } 92 }
93 shell_connection_.reset(new mojo::ShellConnection(this, std::move(request))); 93 shell_connection_.reset(new mojo::ShellConnection(this, std::move(request)));
94 shell_connection_->WaitForInitialize(); 94 shell_connection_->WaitForInitialize();
95 } 95 }
96 96
97 void MojoShellConnectionImpl::Initialize(mojo::Connector* connector, 97 void MojoShellConnectionImpl::Initialize(mojo::Connector* connector,
98 const std::string& url, 98 const std::string& url,
99 uint32_t id, 99 const std::string& user_id,
100 uint32_t user_id) { 100 uint32_t id) {
101 initialized_ = true; 101 initialized_ = true;
102 } 102 }
103 103
104 bool MojoShellConnectionImpl::AcceptConnection(mojo::Connection* connection) { 104 bool MojoShellConnectionImpl::AcceptConnection(mojo::Connection* connection) {
105 bool found = false; 105 bool found = false;
106 for (auto listener : listeners_) 106 for (auto listener : listeners_)
107 found |= listener->AcceptConnection(connection); 107 found |= listener->AcceptConnection(connection);
108 return found; 108 return found;
109 } 109 }
110 110
(...skipping 26 matching lines...) Expand all
137 // static 137 // static
138 void MojoShellConnection::Destroy() { 138 void MojoShellConnection::Destroy() {
139 // This joins the shell controller thread. 139 // This joins the shell controller thread.
140 delete Get(); 140 delete Get();
141 lazy_tls_ptr.Pointer()->Set(nullptr); 141 lazy_tls_ptr.Pointer()->Set(nullptr);
142 } 142 }
143 143
144 MojoShellConnection::~MojoShellConnection() {} 144 MojoShellConnection::~MojoShellConnection() {}
145 145
146 } // namespace content 146 } // namespace content
OLDNEW
« no previous file with comments | « content/common/mojo/mojo_shell_connection_impl.h ('k') | content/public/browser/browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698