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 "services/authenticating_url_loader_interceptor/authenticating_url_load
er_interceptor.h" | 5 #include "services/authenticating_url_loader_interceptor/authenticating_url_load
er_interceptor.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 9 #include "mojo/services/network/interfaces/network_service.mojom.h" |
10 | 10 |
11 namespace mojo { | 11 namespace mojo { |
12 | 12 |
13 AuthenticatingURLLoaderInterceptor::AuthenticatingURLLoaderInterceptor( | 13 AuthenticatingURLLoaderInterceptor::AuthenticatingURLLoaderInterceptor( |
14 mojo::InterfaceRequest<URLLoaderInterceptor> request, | 14 mojo::InterfaceRequest<URLLoaderInterceptor> request, |
15 AuthenticatingURLLoaderInterceptorFactory* factory) | 15 AuthenticatingURLLoaderInterceptorFactory* factory) |
16 : binding_(this, request.Pass()), | 16 : binding_(this, request.Pass()), |
17 factory_(factory), | 17 factory_(factory), |
18 add_authentication_(true), | 18 add_authentication_(true), |
19 request_authorization_state_(REQUEST_INITIAL) { | 19 request_authorization_state_(REQUEST_INITIAL) { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 interceptor_response->response = pending_response_.Pass(); | 207 interceptor_response->response = pending_response_.Pass(); |
208 } else { | 208 } else { |
209 interceptor_response->request = BuildRequest(token); | 209 interceptor_response->request = BuildRequest(token); |
210 } | 210 } |
211 | 211 |
212 pending_interception_callback_.Run(interceptor_response.Pass()); | 212 pending_interception_callback_.Run(interceptor_response.Pass()); |
213 pending_interception_callback_.reset(); | 213 pending_interception_callback_.reset(); |
214 } | 214 } |
215 | 215 |
216 } // namespace mojo | 216 } // namespace mojo |
OLD | NEW |