| 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_
|
|
|