| 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/public/url_data_source_ios.h" | 5 #include "ios/web/public/url_data_source_ios.h" |
| 6 | 6 |
| 7 #include "ios/web/public/web_client.h" | 7 #include "ios/web/public/web_client.h" |
| 8 #include "ios/web/webui/url_data_manager_ios.h" | 8 #include "ios/web/webui/url_data_manager_ios.h" |
| 9 #include "net/url_request/url_request.h" | 9 #include "net/url_request/url_request.h" |
| 10 | 10 |
| 11 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 12 #error "This file requires ARC support." |
| 13 #endif |
| 14 |
| 11 namespace web { | 15 namespace web { |
| 12 | 16 |
| 13 void URLDataSourceIOS::Add(BrowserState* browser_state, | 17 void URLDataSourceIOS::Add(BrowserState* browser_state, |
| 14 URLDataSourceIOS* source) { | 18 URLDataSourceIOS* source) { |
| 15 URLDataManagerIOS::AddDataSource(browser_state, source); | 19 URLDataManagerIOS::AddDataSource(browser_state, source); |
| 16 } | 20 } |
| 17 | 21 |
| 18 bool URLDataSourceIOS::ShouldReplaceExistingSource() const { | 22 bool URLDataSourceIOS::ShouldReplaceExistingSource() const { |
| 19 return true; | 23 return true; |
| 20 } | 24 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 } | 36 } |
| 33 | 37 |
| 34 bool URLDataSourceIOS::ShouldServiceRequest( | 38 bool URLDataSourceIOS::ShouldServiceRequest( |
| 35 const net::URLRequest* request) const { | 39 const net::URLRequest* request) const { |
| 36 if (GetWebClient()->IsAppSpecificURL(request->url())) | 40 if (GetWebClient()->IsAppSpecificURL(request->url())) |
| 37 return true; | 41 return true; |
| 38 return false; | 42 return false; |
| 39 } | 43 } |
| 40 | 44 |
| 41 } // namespace web | 45 } // namespace web |
| OLD | NEW |