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

Unified Diff: mojo/public/cpp/bindings/lib/router.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, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/router.h ('k') | mojo/public/cpp/bindings/lib/sync_handle_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/router.cc
diff --git a/mojo/public/cpp/bindings/lib/router.cc b/mojo/public/cpp/bindings/lib/router.cc
index 2db2eed3e3d4a42847cd5cb881cc237730c42d79..8c1b77d56476c6151eb9b37533f91cff5833fa59 100644
--- a/mojo/public/cpp/bindings/lib/router.cc
+++ b/mojo/public/cpp/bindings/lib/router.cc
@@ -60,7 +60,7 @@ class ResponderThunk : public MessageReceiverWithStatus {
bool Accept(Message* message) override {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
accept_was_invoked_ = true;
- DCHECK(message->has_flag(kMessageIsResponse));
+ DCHECK(message->has_flag(Message::kFlagIsResponse));
bool result = false;
@@ -142,20 +142,20 @@ Router::~Router() {}
bool Router::Accept(Message* message) {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(!message->has_flag(kMessageExpectsResponse));
+ DCHECK(!message->has_flag(Message::kFlagExpectsResponse));
return connector_.Accept(message);
}
bool Router::AcceptWithResponder(Message* message, MessageReceiver* responder) {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(message->has_flag(kMessageExpectsResponse));
+ DCHECK(message->has_flag(Message::kFlagExpectsResponse));
// Reserve 0 in case we want it to convey special meaning in the future.
uint64_t request_id = next_request_id_++;
if (request_id == 0)
request_id = next_request_id_++;
- bool is_sync = message->has_flag(kMessageIsSync);
+ bool is_sync = message->has_flag(Message::kFlagIsSync);
message->set_request_id(request_id);
if (!connector_.Accept(message))
return false;
@@ -202,7 +202,7 @@ bool Router::HandleIncomingMessage(Message* message) {
const bool during_sync_call =
connector_.during_sync_handle_watcher_callback();
- if (!message->has_flag(kMessageIsSync) &&
+ if (!message->has_flag(Message::kFlagIsSync) &&
(during_sync_call || !pending_messages_.empty())) {
std::unique_ptr<Message> pending_message(new Message);
message->MoveTo(pending_message.get());
@@ -250,7 +250,7 @@ void Router::HandleQueuedMessages() {
}
bool Router::HandleMessageInternal(Message* message) {
- if (message->has_flag(kMessageExpectsResponse)) {
+ if (message->has_flag(Message::kFlagExpectsResponse)) {
if (!incoming_receiver_)
return false;
@@ -261,10 +261,10 @@ bool Router::HandleMessageInternal(Message* message) {
delete responder;
return ok;
- } else if (message->has_flag(kMessageIsResponse)) {
+ } else if (message->has_flag(Message::kFlagIsResponse)) {
uint64_t request_id = message->request_id();
- if (message->has_flag(kMessageIsSync)) {
+ if (message->has_flag(Message::kFlagIsSync)) {
auto it = sync_responses_.find(request_id);
if (it == sync_responses_.end()) {
DCHECK(testing_mode_);
« no previous file with comments | « mojo/public/cpp/bindings/lib/router.h ('k') | mojo/public/cpp/bindings/lib/sync_handle_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698