| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_SEARCH_LOCAL_FILES_NTP_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_LOCAL_FILES_NTP_SOURCE_H_ |
| 6 #define CHROME_BROWSER_SEARCH_LOCAL_FILES_NTP_SOURCE_H_ | 6 #define CHROME_BROWSER_SEARCH_LOCAL_FILES_NTP_SOURCE_H_ |
| 7 | 7 |
| 8 #if !defined(GOOGLE_CHROME_BUILD) && !defined(OS_IOS) | |
| 9 | |
| 10 #include <string> | 8 #include <string> |
| 11 #include "content/public/browser/url_data_source.h" | 9 #include "content/public/browser/url_data_source.h" |
| 12 | 10 |
| 13 namespace local_ntp { | 11 namespace local_ntp { |
| 14 | 12 |
| 15 // Sends the content of |path| to |callback|, reading |path| as a local file. | 13 // Sends the content of |path| to |callback|, reading |path| as a local file. |
| 16 // This function is only used for dev builds. | 14 // This function is only used for dev builds. |
| 17 void SendLocalFileResource( | 15 void SendLocalFileResource( |
| 18 const std::string& path, | 16 const std::string& path, |
| 19 const content::URLDataSource::GotDataCallback& callback); | 17 const content::URLDataSource::GotDataCallback& callback); |
| 20 | 18 |
| 21 // Sends the content of |path| to |callback|, reading |path| as a local file. | 19 // Sends the content of |path| to |callback|, reading |path| as a local file. |
| 22 // It also replaces the first occurrence of {{ORIGIN}} with |origin|. | 20 // It also replaces the first occurrence of {{ORIGIN}} with |origin|. |
| 23 // This function is only used for dev builds. | 21 // This function is only used for dev builds. |
| 24 void SendLocalFileResourceWithOrigin( | 22 void SendLocalFileResourceWithOrigin( |
| 25 const std::string& path, | 23 const std::string& path, |
| 26 const std::string& origin, | 24 const std::string& origin, |
| 27 const content::URLDataSource::GotDataCallback& callback); | 25 const content::URLDataSource::GotDataCallback& callback); |
| 28 | 26 |
| 29 } // namespace local_ntp | 27 } // namespace local_ntp |
| 30 | 28 |
| 31 #endif // !defined(GOOGLE_CHROME_BUILD) && !defined(OS_IOS) | |
| 32 #endif // CHROME_BROWSER_SEARCH_LOCAL_FILES_NTP_SOURCE_H_ | 29 #endif // CHROME_BROWSER_SEARCH_LOCAL_FILES_NTP_SOURCE_H_ |
| OLD | NEW |