Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1525)

Unified Diff: chrome/browser/ui/webui/prefs_internals_source.h

Issue 2725903002: [WebUI] Add a chrome://prefs-internals page (Closed)
Patch Set: Dan's Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/prefs_internals_source.h
diff --git a/chrome/browser/ui/webui/prefs_internals_source.h b/chrome/browser/ui/webui/prefs_internals_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..471c05d09e6dc14e9453c210fa74c44123c52e7b
--- /dev/null
+++ b/chrome/browser/ui/webui/prefs_internals_source.h
@@ -0,0 +1,33 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_
+#define CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_
+
+#include "base/macros.h"
+#include "content/public/browser/url_data_source.h"
+
+class Profile;
+
+// A simple data source that returns the preferences for the associated profile.
+class PrefsInternalsSource : public content::URLDataSource {
+ public:
+ explicit PrefsInternalsSource(Profile* profile);
+ ~PrefsInternalsSource() override;
+
+ // content::URLDataSource:
+ std::string GetSource() const override;
+ std::string GetMimeType(const std::string& path) const override;
+ void StartDataRequest(
+ const std::string& path,
+ const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
+ const content::URLDataSource::GotDataCallback& callback) override;
+
+ private:
+ Profile* profile_;
+
+ DISALLOW_COPY_AND_ASSIGN(PrefsInternalsSource);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_
« no previous file with comments | « chrome/browser/ui/webui/prefs_internals_browsertest.cc ('k') | chrome/browser/ui/webui/prefs_internals_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698