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

Side by Side Diff: mojo/public/cpp/bindings/lib/sync_handle_watcher.cc

Issue 2114523002: Move more Mojo bindings helpers out of internal namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@group-controller
Patch Set: rebase Created 4 years, 5 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 "mojo/public/cpp/bindings/lib/sync_handle_watcher.h" 5 #include "mojo/public/cpp/bindings/sync_handle_watcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace internal {
11 10
12 SyncHandleWatcher::SyncHandleWatcher( 11 SyncHandleWatcher::SyncHandleWatcher(
13 const Handle& handle, 12 const Handle& handle,
14 MojoHandleSignals handle_signals, 13 MojoHandleSignals handle_signals,
15 const SyncHandleRegistry::HandleCallback& callback) 14 const SyncHandleRegistry::HandleCallback& callback)
16 : handle_(handle), 15 : handle_(handle),
17 handle_signals_(handle_signals), 16 handle_signals_(handle_signals),
18 callback_(callback), 17 callback_(callback),
19 registered_(false), 18 registered_(false),
20 register_request_count_(0), 19 register_request_count_(0),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void SyncHandleWatcher::DecrementRegisterCount() { 66 void SyncHandleWatcher::DecrementRegisterCount() {
68 DCHECK_GT(register_request_count_, 0u); 67 DCHECK_GT(register_request_count_, 0u);
69 68
70 register_request_count_--; 69 register_request_count_--;
71 if (register_request_count_ == 0 && registered_) { 70 if (register_request_count_ == 0 && registered_) {
72 registry_->UnregisterHandle(handle_); 71 registry_->UnregisterHandle(handle_);
73 registered_ = false; 72 registered_ = false;
74 } 73 }
75 } 74 }
76 75
77 } // namespace internal
78 } // namespace mojo 76 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/sync_handle_watcher.h ('k') | mojo/public/cpp/bindings/lib/validation_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698