| 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 "components/nacl/renderer/manifest_downloader.h" | 5 #include "components/nacl/renderer/manifest_downloader.h" | 
| 6 | 6 | 
|  | 7 #include <utility> | 
|  | 8 | 
| 7 #include "base/callback.h" | 9 #include "base/callback.h" | 
| 8 #include "components/nacl/renderer/histogram.h" | 10 #include "components/nacl/renderer/histogram.h" | 
| 9 #include "components/nacl/renderer/nexe_load_manager.h" | 11 #include "components/nacl/renderer/nexe_load_manager.h" | 
| 10 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" | 
| 11 #include "third_party/WebKit/public/platform/WebURLError.h" | 13 #include "third_party/WebKit/public/platform/WebURLError.h" | 
| 12 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 14 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 
| 13 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 15 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 
| 14 | 16 | 
| 15 namespace nacl { | 17 namespace nacl { | 
| 16 | 18 | 
| 17 ManifestDownloader::ManifestDownloader( | 19 ManifestDownloader::ManifestDownloader( | 
| 18     scoped_ptr<blink::WebURLLoader> url_loader, | 20     scoped_ptr<blink::WebURLLoader> url_loader, | 
| 19     bool is_installed, | 21     bool is_installed, | 
| 20     Callback cb) | 22     Callback cb) | 
| 21     : url_loader_(url_loader.Pass()), | 23     : url_loader_(std::move(url_loader)), | 
| 22       is_installed_(is_installed), | 24       is_installed_(is_installed), | 
| 23       cb_(cb), | 25       cb_(cb), | 
| 24       status_code_(-1), | 26       status_code_(-1), | 
| 25       pp_nacl_error_(PP_NACL_ERROR_LOAD_SUCCESS) { | 27       pp_nacl_error_(PP_NACL_ERROR_LOAD_SUCCESS) { | 
| 26   CHECK(!cb.is_null()); | 28   CHECK(!cb.is_null()); | 
| 27 } | 29 } | 
| 28 | 30 | 
| 29 ManifestDownloader::~ManifestDownloader() { } | 31 ManifestDownloader::~ManifestDownloader() { } | 
| 30 | 32 | 
| 31 void ManifestDownloader::Load(const blink::WebURLRequest& request) { | 33 void ManifestDownloader::Load(const blink::WebURLRequest& request) { | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 87     } | 89     } | 
| 88   } else { | 90   } else { | 
| 89     // It's a WebKit error. | 91     // It's a WebKit error. | 
| 90     pp_nacl_error_ = PP_NACL_ERROR_MANIFEST_NOACCESS_URL; | 92     pp_nacl_error_ = PP_NACL_ERROR_MANIFEST_NOACCESS_URL; | 
| 91   } | 93   } | 
| 92 | 94 | 
| 93   Close(); | 95   Close(); | 
| 94 } | 96 } | 
| 95 | 97 | 
| 96 }  // namespace nacl | 98 }  // namespace nacl | 
| OLD | NEW | 
|---|