Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #include "ios/web/public/url_data_source_ios.h" | |
| 6 | |
| 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" | |
| 10 | |
| 11 namespace web { | |
| 12 | |
| 13 void URLDataSourceIOS::Add(BrowserState* browser_state, | |
| 14 URLDataSourceIOS* source) { | |
| 15 URLDataManagerIOS::AddDataSource(browser_state, source); | |
| 16 } | |
| 17 | |
| 18 bool URLDataSourceIOS::ShouldReplaceExistingSource() const { | |
| 19 return true; | |
| 20 } | |
| 21 | |
| 22 bool URLDataSourceIOS::AllowCaching() const { | |
| 23 return true; | |
| 24 } | |
| 25 | |
| 26 std::string URLDataSourceIOS::GetContentSecurityPolicyObjectSrc() const { | |
| 27 return "object-src 'none';"; | |
| 28 } | |
| 29 | |
| 30 bool URLDataSourceIOS::ShouldDenyXFrameOptions() const { | |
| 31 return true; | |
| 32 } | |
| 33 | |
| 34 bool URLDataSourceIOS::ShouldServiceRequest( | |
| 35 const net::URLRequest* request) const { | |
| 36 if (GetWebClient()->IsAppSpecificURL(request->url())) | |
|
Eugene But (OOO till 7-30)
2015/04/28 20:23:01
NIT:
return GetWebClient()->IsAppSpecificURL(requ
| |
| 37 return true; | |
| 38 return false; | |
| 39 } | |
| 40 | |
| 41 } // namespace web | |
| OLD | NEW |