Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: ios/web/webui/url_data_source_ios.cc

Issue 1110213002: Upstream most of the iOS WebUI support in ios/web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698