blob: 5fc4058ba9ea9cb2109d337210806014039fae0a [file] [log] [blame]
rdevlin.croninbe084d22017-03-20 21:22:201// 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
11class Profile;
12
13// A simple data source that returns the preferences for the associated profile.
14class PrefsInternalsSource : public content::URLDataSource {
15 public:
16 explicit PrefsInternalsSource(Profile* profile);
17 ~PrefsInternalsSource() override;
18
19 // content::URLDataSource:
Lucas Furukawa Gadani4b4eed02019-06-04 23:12:0420 std::string GetSource() override;
21 std::string GetMimeType(const std::string& path) override;
rdevlin.croninbe084d22017-03-20 21:22:2022 void StartDataRequest(
Wei-Yin Chen (陳威尹)39f4ff32019-10-22 17:59:0923 const GURL& url,
John Abd-El-Malek92bf3602019-07-31 02:25:4824 const content::WebContents::Getter& wc_getter,
danakjf4b9e942019-11-29 15:43:0425 content::URLDataSource::GotDataCallback callback) override;
rdevlin.croninbe084d22017-03-20 21:22:2026
27 private:
28 Profile* profile_;
29
30 DISALLOW_COPY_AND_ASSIGN(PrefsInternalsSource);
31};
32
33#endif // CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_