OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // Returns true if this DataSource should replace an existing DataSource | 100 // Returns true if this DataSource should replace an existing DataSource |
101 // with the same name that has already been registered. The default is | 101 // with the same name that has already been registered. The default is |
102 // true. | 102 // true. |
103 // | 103 // |
104 // WARNING: this is invoked on the IO thread. | 104 // WARNING: this is invoked on the IO thread. |
105 // | 105 // |
106 // TODO: nuke this and convert all callers to not replace. | 106 // TODO: nuke this and convert all callers to not replace. |
107 virtual bool ShouldReplaceExistingSource() const; | 107 virtual bool ShouldReplaceExistingSource() const; |
108 | 108 |
109 // Returns true if responses from this DataSource can be cached. | 109 // Returns true if responses from this DataSource can be cached. |
110 virtual bool AllowCaching() const { return true; } | 110 virtual bool AllowCaching() const; |
111 | 111 |
112 static void SetFontAndTextDirection( | 112 static void SetFontAndTextDirection( |
113 base::DictionaryValue* localized_strings); | 113 base::DictionaryValue* localized_strings); |
114 | 114 |
115 protected: | 115 protected: |
116 virtual ~DataSource(); | 116 virtual ~DataSource(); |
117 | 117 |
118 private: | 118 private: |
119 friend class ChromeURLDataManagerBackend; | 119 friend class ChromeURLDataManagerBackend; |
120 friend class ChromeURLDataManager; | 120 friend class ChromeURLDataManager; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 const base::Callback<ChromeURLDataManagerBackend*(void)> backend_; | 187 const base::Callback<ChromeURLDataManagerBackend*(void)> backend_; |
188 | 188 |
189 // |data_sources_| that are no longer referenced and scheduled for deletion. | 189 // |data_sources_| that are no longer referenced and scheduled for deletion. |
190 // Protected by g_delete_lock in the .cc file. | 190 // Protected by g_delete_lock in the .cc file. |
191 static DataSources* data_sources_; | 191 static DataSources* data_sources_; |
192 | 192 |
193 DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManager); | 193 DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManager); |
194 }; | 194 }; |
195 | 195 |
196 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ | 196 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ |
OLD | NEW |