OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/search/local_files_ntp_source.h" | 5 #include "chrome/browser/search/local_files_ntp_source.h" |
6 | 6 |
7 #if !defined(GOOGLE_CHROME_BUILD) && !defined(OS_IOS) | 7 #if !defined(GOOGLE_CHROME_BUILD) && !defined(OS_IOS) |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
| 18 #include "build/build_config.h" |
18 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
19 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
20 #include "content/public/browser/url_data_source.h" | 21 #include "content/public/browser/url_data_source.h" |
21 #include "third_party/re2/src/re2/re2.h" | 22 #include "third_party/re2/src/re2/re2.h" |
22 #include "third_party/re2/src/re2/stringpiece.h" | 23 #include "third_party/re2/src/re2/stringpiece.h" |
23 | 24 |
24 namespace { | 25 namespace { |
25 | 26 |
26 const char kBasePath[] = "chrome/browser/resources/local_ntp"; | 27 const char kBasePath[] = "chrome/browser/resources/local_ntp"; |
27 | 28 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 base::Bind(&CheckLocalIncludes, callback); | 119 base::Bind(&CheckLocalIncludes, callback); |
119 base::PostTaskAndReplyWithResult( | 120 base::PostTaskAndReplyWithResult( |
120 content::BrowserThread::GetBlockingPool(), FROM_HERE, | 121 content::BrowserThread::GetBlockingPool(), FROM_HERE, |
121 base::Bind(&ReadFileAndReturn, fullpath), | 122 base::Bind(&ReadFileAndReturn, fullpath), |
122 base::Bind(&CallbackWithLoadedResource, origin, wrapper)); | 123 base::Bind(&CallbackWithLoadedResource, origin, wrapper)); |
123 } | 124 } |
124 | 125 |
125 } // namespace local_ntp | 126 } // namespace local_ntp |
126 | 127 |
127 #endif // !defined(GOOGLE_CHROME_BUILD) && !defined(OS_IOS) | 128 #endif // !defined(GOOGLE_CHROME_BUILD) && !defined(OS_IOS) |
OLD | NEW |