Chromium Code Reviews| 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..47079025d720239aadc7db70fa5996fcfef4d517 |
| --- /dev/null |
| +++ b/components/ukm/debug_page/debug_page.h |
| @@ -0,0 +1,45 @@ |
| +// 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; |
|
Alexei Svitkine (slow)
2017/05/05 16:45:05
Nit: Add an empty line before this.
Steven Holte
2017/05/05 18:16:43
Done.
|
| + |
| +namespace debug { |
| + |
| +class DebugPage : public content::URLDataSource { |
|
Alexei Svitkine (slow)
2017/05/05 16:45:05
Add a comment.
Steven Holte
2017/05/05 18:16:43
Done.
|
| + public: |
| + typedef base::Callback<UkmService*()> ServiceGetter; |
| + |
| + DebugPage(ServiceGetter service_getter); |
|
Alexei Svitkine (slow)
2017/05/05 16:45:05
Nit: explicit
Steven Holte
2017/05/05 18:16:43
Done.
|
| + |
| + // 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_ |