OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/webui/url_data_manager_backend.h" | 5 #include "content/browser/webui/url_data_manager_backend.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 | 484 |
485 // Look up the data source for the request. | 485 // Look up the data source for the request. |
486 DataSourceMap::iterator i = data_sources_.find(source_name); | 486 DataSourceMap::iterator i = data_sources_.find(source_name); |
487 if (i == data_sources_.end()) | 487 if (i == data_sources_.end()) |
488 return false; | 488 return false; |
489 | 489 |
490 URLDataSourceImpl* source = i->second; | 490 URLDataSourceImpl* source = i->second; |
491 | 491 |
492 if (!source->source()->ShouldServiceRequest(request)) | 492 if (!source->source()->ShouldServiceRequest(request)) |
493 return false; | 493 return false; |
| 494 source->source()->WillServiceRequest(request, &path); |
494 | 495 |
495 // Save this request so we know where to send the data. | 496 // Save this request so we know where to send the data. |
496 RequestID request_id = next_request_id_++; | 497 RequestID request_id = next_request_id_++; |
497 pending_requests_.insert(std::make_pair(request_id, job)); | 498 pending_requests_.insert(std::make_pair(request_id, job)); |
498 | 499 |
499 job->set_allow_caching(source->source()->AllowCaching()); | 500 job->set_allow_caching(source->source()->AllowCaching()); |
500 job->set_add_content_security_policy( | 501 job->set_add_content_security_policy( |
501 source->source()->ShouldAddContentSecurityPolicy()); | 502 source->source()->ShouldAddContentSecurityPolicy()); |
502 job->set_content_security_policy_object_source( | 503 job->set_content_security_policy_object_source( |
503 source->source()->GetContentSecurityPolicyObjectSrc()); | 504 source->source()->GetContentSecurityPolicyObjectSrc()); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 | 624 |
624 } // namespace | 625 } // namespace |
625 | 626 |
626 net::URLRequestJobFactory::ProtocolHandler* | 627 net::URLRequestJobFactory::ProtocolHandler* |
627 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, | 628 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, |
628 bool is_incognito) { | 629 bool is_incognito) { |
629 return new DevToolsJobFactory(resource_context, is_incognito); | 630 return new DevToolsJobFactory(resource_context, is_incognito); |
630 } | 631 } |
631 | 632 |
632 } // namespace content | 633 } // namespace content |
OLD | NEW |