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

Unified Diff: components/data_use_measurement/core/data_use_measurement.h

Issue 1355893004: Complete the layered architecture of data_use_measurement component. Base URL: https://chromium.googlesource.com/chromium/src.git@NewArchServices
Patch Set: Created 5 years, 3 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: components/data_use_measurement/core/data_use_measurement.h
diff --git a/components/data_use_measurement/content/data_use_measurement.h b/components/data_use_measurement/core/data_use_measurement.h
similarity index 87%
rename from components/data_use_measurement/content/data_use_measurement.h
rename to components/data_use_measurement/core/data_use_measurement.h
index a5b8f7136359a70c26fe085c11fb0471549bb004..e250ec3dfd8e723261bfa02200995b4c87dbe380 100644
--- a/components/data_use_measurement/content/data_use_measurement.h
+++ b/components/data_use_measurement/core/data_use_measurement.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_
-#define COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_
+#ifndef COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_MEASUREMENT_H_
+#define COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_MEASUREMENT_H_
#include <stdint.h>
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
+#include "components/data_use_measurement/core/data_use_measurement_delegate.h"
#include "components/data_use_measurement/core/data_use_user_data.h"
#if defined(OS_ANDROID)
@@ -32,7 +33,8 @@ namespace data_use_measurement {
// http://crbug.com/527460
class DataUseMeasurement {
public:
- DataUseMeasurement();
+ // This class gets the ownership of data_use_measurement_delegate object.
+ DataUseMeasurement(DataUseMeasurementDelegate* data_use_measurement_delegate);
~DataUseMeasurement();
// Records the data use of the |request|, thus |request| must be non-null.
@@ -81,6 +83,8 @@ class DataUseMeasurement {
TrafficDirection dir,
int64_t message_size) const;
+ scoped_ptr<DataUseMeasurementDelegate> data_use_measurement_delegate_;
+
#if defined(OS_ANDROID)
// Application listener store the last known state of the application in this
// field.
@@ -96,4 +100,4 @@ class DataUseMeasurement {
} // namespace data_use_measurement
-#endif // COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_MEASUREMENT_H_
+#endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_MEASUREMENT_H_

Powered by Google App Engine
This is Rietveld 408576698