OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/public/browser/url_data_source.h" | 5 #include "content/public/browser/url_data_source.h" |
6 | 6 |
7 #include "content/browser/webui/url_data_manager.h" | 7 #include "content/browser/webui/url_data_manager.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 #include "content/public/common/url_constants.h" | 9 #include "content/public/common/url_constants.h" |
10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 void URLDataSource::Add(BrowserContext* browser_context, | 14 void URLDataSource::Add(BrowserContext* browser_context, |
15 URLDataSource* source) { | 15 URLDataSource* source) { |
16 URLDataManager::AddDataSource(browser_context, source); | 16 URLDataManager::AddDataSource(browser_context, source); |
17 } | 17 } |
18 | 18 |
19 base::MessageLoop* URLDataSource::MessageLoopForRequestPath( | 19 scoped_refptr<base::SingleThreadTaskRunner> |
20 const std::string& path) const { | 20 URLDataSource::TaskRunnerForRequestPath(const std::string& path) const { |
21 return BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::UI); | 21 return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); |
22 } | 22 } |
23 | 23 |
24 bool URLDataSource::ShouldReplaceExistingSource() const { | 24 bool URLDataSource::ShouldReplaceExistingSource() const { |
25 return true; | 25 return true; |
26 } | 26 } |
27 | 27 |
28 bool URLDataSource::AllowCaching() const { | 28 bool URLDataSource::AllowCaching() const { |
29 return true; | 29 return true; |
30 } | 30 } |
31 | 31 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 std::string URLDataSource::GetAccessControlAllowOriginForOrigin( | 74 std::string URLDataSource::GetAccessControlAllowOriginForOrigin( |
75 const std::string& origin) const { | 75 const std::string& origin) const { |
76 return std::string(); | 76 return std::string(); |
77 } | 77 } |
78 | 78 |
79 bool URLDataSource::IsGzipped(const std::string& path) const { | 79 bool URLDataSource::IsGzipped(const std::string& path) const { |
80 return false; | 80 return false; |
81 } | 81 } |
82 | 82 |
83 } // namespace content | 83 } // namespace content |
OLD | NEW |