OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/dynamic_service_loader.h" | 5 #include "mojo/shell/dynamic_service_loader.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 url_loader_.set_client(this); | 89 url_loader_.set_client(this); |
90 } | 90 } |
91 | 91 |
92 virtual void Start(const GURL& url, | 92 virtual void Start(const GURL& url, |
93 ScopedMessagePipeHandle service_handle, | 93 ScopedMessagePipeHandle service_handle, |
94 Context* context) OVERRIDE { | 94 Context* context) OVERRIDE { |
95 service_handle_ = service_handle.Pass(); | 95 service_handle_ = service_handle.Pass(); |
96 | 96 |
97 URLRequestPtr request(URLRequest::New()); | 97 URLRequestPtr request(URLRequest::New()); |
98 request->url = url.spec(); | 98 request->url = url.spec(); |
99 request->follow_redirects = true; | 99 request->auto_follow_redirects = true; |
100 | 100 |
101 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 101 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
102 switches::kDisableCache)) { | 102 switches::kDisableCache)) { |
103 request->bypass_cache = true; | 103 request->bypass_cache = true; |
104 } | 104 } |
105 | 105 |
106 DataPipe data_pipe; | 106 DataPipe data_pipe; |
107 url_loader_->Start(request.Pass(), data_pipe.producer_handle.Pass()); | 107 url_loader_->Start(request.Pass(), data_pipe.producer_handle.Pass()); |
108 | 108 |
109 base::CreateTemporaryFile(&file_); | 109 base::CreateTemporaryFile(&file_); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 void DynamicServiceLoader::OnServiceError(ServiceManager* manager, | 174 void DynamicServiceLoader::OnServiceError(ServiceManager* manager, |
175 const GURL& url) { | 175 const GURL& url) { |
176 // TODO(darin): What should we do about service errors? This implies that | 176 // TODO(darin): What should we do about service errors? This implies that |
177 // the app closed its handle to the service manager. Maybe we don't care? | 177 // the app closed its handle to the service manager. Maybe we don't care? |
178 } | 178 } |
179 | 179 |
180 } // namespace shell | 180 } // namespace shell |
181 } // namespace mojo | 181 } // namespace mojo |
OLD | NEW |