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

Side by Side Diff: services/media/factory_service/network_reader_impl.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "mojo/public/cpp/system/data_pipe.h" 6 #include "mojo/public/cpp/system/data_pipe.h"
7 #include "services/media/factory_service/network_reader_impl.h" 7 #include "services/media/factory_service/network_reader_impl.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace media { 10 namespace media {
(...skipping 16 matching lines...) Expand all
27 InterfaceRequest<SeekingReader> request, 27 InterfaceRequest<SeekingReader> request,
28 MediaFactoryService* owner) 28 MediaFactoryService* owner)
29 : MediaFactoryService::Product(owner), 29 : MediaFactoryService::Product(owner),
30 binding_(this, request.Pass()), 30 binding_(this, request.Pass()),
31 url_(url) { 31 url_(url) {
32 // Go away when the client is no longer connected. 32 // Go away when the client is no longer connected.
33 binding_.set_connection_error_handler([this]() { ReleaseFromOwner(); }); 33 binding_.set_connection_error_handler([this]() { ReleaseFromOwner(); });
34 34
35 NetworkServicePtr network_service; 35 NetworkServicePtr network_service;
36 36
37 app()->ConnectToService("mojo:network_service", &network_service); 37 app()->ConnectToServiceDeprecated("mojo:network_service", &network_service);
38 38
39 network_service->CreateURLLoader(GetProxy(&url_loader_)); 39 network_service->CreateURLLoader(GetProxy(&url_loader_));
40 40
41 URLRequestPtr url_request(URLRequest::New()); 41 URLRequestPtr url_request(URLRequest::New());
42 url_request->url = url_; 42 url_request->url = url_;
43 url_request->method = "HEAD"; 43 url_request->method = "HEAD";
44 44
45 url_loader_->Start(url_request.Pass(), [this](URLResponsePtr response) { 45 url_loader_->Start(url_request.Pass(), [this](URLResponsePtr response) {
46 // TODO(dalesat): Handle redirects. 46 // TODO(dalesat): Handle redirects.
47 if (response->status_code != kStatusOk) { 47 if (response->status_code != kStatusOk) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 DCHECK(response->body.is_valid()); 115 DCHECK(response->body.is_valid());
116 callback.Run(result_, response->body.Pass()); 116 callback.Run(result_, response->body.Pass());
117 }); 117 });
118 }); 118 });
119 } 119 }
120 120
121 } // namespace media 121 } // namespace media
122 } // namespace mojo 122 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/factory_service/media_player_impl.cc ('k') | services/nacl/nonsfi/content_handler_main_pexe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698