OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "content/public/browser/url_data_source.h" |
| 10 |
| 11 class Profile; |
| 12 |
| 13 // A simple data source that returns the preferences for the associated profile. |
| 14 class PrefsInternalsSource : public content::URLDataSource { |
| 15 public: |
| 16 explicit PrefsInternalsSource(Profile* profile); |
| 17 ~PrefsInternalsSource() override; |
| 18 |
| 19 // content::URLDataSource: |
| 20 std::string GetSource() const override; |
| 21 std::string GetMimeType(const std::string& path) const override; |
| 22 void StartDataRequest( |
| 23 const std::string& path, |
| 24 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, |
| 25 const content::URLDataSource::GotDataCallback& callback) override; |
| 26 |
| 27 private: |
| 28 Profile* profile_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(PrefsInternalsSource); |
| 31 }; |
| 32 |
| 33 #endif // CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_ |
OLD | NEW |