| 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 "ios/web/webui/url_data_manager_ios_backend.h" | 5 #include "ios/web/webui/url_data_manager_ios_backend.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "net/base/io_buffer.h" | 28 #include "net/base/io_buffer.h" |
| 29 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
| 30 #include "net/http/http_response_headers.h" | 30 #include "net/http/http_response_headers.h" |
| 31 #include "net/http/http_status_code.h" | 31 #include "net/http/http_status_code.h" |
| 32 #include "net/url_request/url_request.h" | 32 #include "net/url_request/url_request.h" |
| 33 #include "net/url_request/url_request_context.h" | 33 #include "net/url_request/url_request_context.h" |
| 34 #include "net/url_request/url_request_job.h" | 34 #include "net/url_request/url_request_job.h" |
| 35 #include "net/url_request/url_request_job_factory.h" | 35 #include "net/url_request/url_request_job_factory.h" |
| 36 #include "url/url_util.h" | 36 #include "url/url_util.h" |
| 37 | 37 |
| 38 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 39 #error "This file requires ARC support." |
| 40 #endif |
| 41 |
| 38 using web::WebThread; | 42 using web::WebThread; |
| 39 | 43 |
| 40 namespace web { | 44 namespace web { |
| 41 | 45 |
| 42 namespace { | 46 namespace { |
| 43 | 47 |
| 44 // TODO(tsepez) remove unsafe-eval when bidichecker_packaged.js fixed. | 48 // TODO(tsepez) remove unsafe-eval when bidichecker_packaged.js fixed. |
| 45 const char kChromeURLContentSecurityPolicyHeaderBase[] = | 49 const char kChromeURLContentSecurityPolicyHeaderBase[] = |
| 46 "Content-Security-Policy: script-src chrome://resources " | 50 "Content-Security-Policy: script-src chrome://resources " |
| 47 "'self' 'unsafe-eval'; "; | 51 "'self' 'unsafe-eval'; "; |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 // Forward this data on to the pending net::URLRequest, if it exists. | 520 // Forward this data on to the pending net::URLRequest, if it exists. |
| 517 PendingRequestMap::iterator i = pending_requests_.find(request_id); | 521 PendingRequestMap::iterator i = pending_requests_.find(request_id); |
| 518 if (i != pending_requests_.end()) { | 522 if (i != pending_requests_.end()) { |
| 519 URLRequestChromeJob* job(i->second); | 523 URLRequestChromeJob* job(i->second); |
| 520 pending_requests_.erase(i); | 524 pending_requests_.erase(i); |
| 521 job->DataAvailable(bytes); | 525 job->DataAvailable(bytes); |
| 522 } | 526 } |
| 523 } | 527 } |
| 524 | 528 |
| 525 } // namespace web | 529 } // namespace web |
| OLD | NEW |