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

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

Issue 323593002: Mojo: Use network service to load non-local Mojo Apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/services/network/url_loader_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/connector.h" 5 #include "mojo/public/cpp/bindings/lib/connector.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include "mojo/public/cpp/bindings/error_handler.h" 10 #include "mojo/public/cpp/bindings/error_handler.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 message_pipe_.get().value(), 111 message_pipe_.get().value(),
112 MOJO_WAIT_FLAG_READABLE, 112 MOJO_WAIT_FLAG_READABLE,
113 MOJO_DEADLINE_INDEFINITE, 113 MOJO_DEADLINE_INDEFINITE,
114 &Connector::CallOnHandleReady, 114 &Connector::CallOnHandleReady,
115 this); 115 this);
116 } 116 }
117 117
118 void Connector::ReadMore() { 118 void Connector::ReadMore() {
119 while (true) { 119 while (true) {
120 bool receiver_result = false; 120 bool receiver_result = false;
121 MojoResult rv = ReadAndDispatchMessage( 121 MojoResult rv = ReadAndDispatchMessage(
122 message_pipe_.get(), incoming_receiver_, &receiver_result); 122 message_pipe_.get(), incoming_receiver_, &receiver_result);
123 if (rv == MOJO_RESULT_SHOULD_WAIT) { 123 if (rv == MOJO_RESULT_SHOULD_WAIT) {
124 WaitToReadMore(); 124 WaitToReadMore();
125 break; 125 break;
126 } 126 }
127 if (rv != MOJO_RESULT_OK || 127 if (rv != MOJO_RESULT_OK ||
128 (enforce_errors_from_incoming_receiver_ && !receiver_result)) { 128 (enforce_errors_from_incoming_receiver_ && !receiver_result)) {
129 error_ = true; 129 error_ = true;
130 break; 130 break;
131 } 131 }
132 } 132 }
133 } 133 }
134 134
135 } // namespace internal 135 } // namespace internal
136 } // namespace mojo 136 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/services/network/url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698