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

Side by Side Diff: mojo/services/network/network_service_delegate.cc

Issue 1635603002: Make use of CreateInterfacePtrAndBind() where appropriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 11 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
« no previous file with comments | « media/mojo/services/mojo_renderer_impl.cc ('k') | mojo/shell/application_instance.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 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 "mojo/services/network/network_service_delegate.h" 5 #include "mojo/services/network/network_service_delegate.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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 #if !defined(OS_ANDROID) 92 #if !defined(OS_ANDROID)
93 // TODO(erg): The following doesn't work when running the android 93 // TODO(erg): The following doesn't work when running the android
94 // apptests. It works in the mandoline shell (on desktop and on android), and 94 // apptests. It works in the mandoline shell (on desktop and on android), and
95 // in the apptests on desktop. However, on android, whenever we make the call 95 // in the apptests on desktop. However, on android, whenever we make the call
96 // to OpenFileSystem, the entire mojo system hangs to the point where writes 96 // to OpenFileSystem, the entire mojo system hangs to the point where writes
97 // to stderr that previously would have printed to our console aren't. The 97 // to stderr that previously would have printed to our console aren't. The
98 // apptests are also fairly resistant to being run under gdb on android. 98 // apptests are also fairly resistant to being run under gdb on android.
99 app_->ConnectToService("mojo:filesystem", &files_); 99 app_->ConnectToService("mojo:filesystem", &files_);
100 100
101 filesystem::FileSystemClientPtr client;
102 binding_.Bind(GetProxy(&client));
103
104 filesystem::FileError error = filesystem::FileError::FAILED; 101 filesystem::FileError error = filesystem::FileError::FAILED;
105 filesystem::DirectoryPtr directory; 102 filesystem::DirectoryPtr directory;
106 files_->OpenFileSystem("origin", GetProxy(&directory), std::move(client), 103 files_->OpenFileSystem("origin", GetProxy(&directory),
107 Capture(&error)); 104 binding_.CreateInterfacePtrAndBind(), Capture(&error));
108 files_.WaitForIncomingResponse(); 105 files_.WaitForIncomingResponse();
109 106
110 io_worker_thread_.reset(new SQLThread(std::move(directory))); 107 io_worker_thread_.reset(new SQLThread(std::move(directory)));
111 #endif 108 #endif
112 109
113 // TODO(erg): Find everything else that writes to the filesystem and 110 // TODO(erg): Find everything else that writes to the filesystem and
114 // transition it to proxying mojo:filesystem. We shouldn't have any path 111 // transition it to proxying mojo:filesystem. We shouldn't have any path
115 // calculation code here, but sadly need it until the transition is done. In 112 // calculation code here, but sadly need it until the transition is done. In
116 // the mean time, manually handle the user-data-dir switch (which gets set in 113 // the mean time, manually handle the user-data-dir switch (which gets set in
117 // tests) so that tests are writing to a temp dir. 114 // tests) so that tests are writing to a temp dir.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 FOR_EACH_OBSERVER(NetworkServiceDelegateObserver, observers_, 195 FOR_EACH_OBSERVER(NetworkServiceDelegateObserver, observers_,
199 OnIOWorkerThreadShutdown()); 196 OnIOWorkerThreadShutdown());
200 197
201 // Destroy the io worker thread here so that we can commit any pending 198 // Destroy the io worker thread here so that we can commit any pending
202 // cookies here. 199 // cookies here.
203 io_worker_thread_.reset(); 200 io_worker_thread_.reset();
204 } 201 }
205 } 202 }
206 203
207 } // namespace mojo 204 } // namespace mojo
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_renderer_impl.cc ('k') | mojo/shell/application_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698