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
3 // found in the LICENSE file.
5 #include "ios/web/public/url_data_source_ios.h"
7 #include "ios/web/public/web_client.h"
8 #include "ios/web/webui/url_data_manager_ios.h"
9 #include "net/url_request/url_request.h"
13 void URLDataSourceIOS::Add(BrowserState
* browser_state
,
14 URLDataSourceIOS
* source
) {
15 URLDataManagerIOS::AddDataSource(browser_state
, source
);
18 bool URLDataSourceIOS::ShouldReplaceExistingSource() const {
22 bool URLDataSourceIOS::AllowCaching() const {
26 std::string
URLDataSourceIOS::GetContentSecurityPolicyObjectSrc() const {
27 return "object-src 'none';";
30 bool URLDataSourceIOS::ShouldDenyXFrameOptions() const {
34 bool URLDataSourceIOS::ShouldServiceRequest(
35 const net::URLRequest
* request
) const {
36 if (GetWebClient()->IsAppSpecificURL(request
->url()))