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

Unified Diff: components/ukm/debug_page/debug_page.h

Issue 2858683006: UKM debug page (Closed)
Patch Set: Seperate BUILD file Created 3 years, 7 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
« no previous file with comments | « components/ukm/debug_page/DEPS ('k') | components/ukm/debug_page/debug_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ukm/debug_page/debug_page.h
diff --git a/components/ukm/debug_page/debug_page.h b/components/ukm/debug_page/debug_page.h
new file mode 100644
index 0000000000000000000000000000000000000000..52ae7a167afcba58719eb864924801940bfcc25a
--- /dev/null
+++ b/components/ukm/debug_page/debug_page.h
@@ -0,0 +1,47 @@
+// Copyright (c) 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 COMPONENTS_UKM_DEBUG_PAGE_REQUEST_JOB_H_
+#define COMPONENTS_UKM_DEBUG_PAGE_REQUEST_JOB_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "content/public/browser/url_data_source.h"
+
+namespace ukm {
+
+class UkmService;
+
+namespace debug {
+
+// Implements the chrome://ukm page for debugging UKM state.
+class DebugPage : public content::URLDataSource {
+ public:
+ typedef base::Callback<UkmService*()> ServiceGetter;
+
+ explicit DebugPage(ServiceGetter service_getter);
+
+ // 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;
+ bool AllowCaching() const override;
+
+ private:
+ ~DebugPage() override;
+
+ ServiceGetter service_getter_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(DebugPage);
+};
+
+} // namespace debug
+} // namespace ukm
+
+#endif // COMPONENTS_UKM_DEBUG_PAGE_REQUEST_JOB_H_
« no previous file with comments | « components/ukm/debug_page/DEPS ('k') | components/ukm/debug_page/debug_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698