Index: chrome/browser/data_use_measurement/data_use_web_contents_observer.cc |
diff --git a/chrome/browser/data_use_measurement/data_use_web_contents_observer.cc b/chrome/browser/data_use_measurement/data_use_web_contents_observer.cc |
index 9d20afa48083ab17068573a7cc581b8e3244954b..91170f23fdfdbf10532bc1cbfcb19db4b6e7b93a 100644 |
--- a/chrome/browser/data_use_measurement/data_use_web_contents_observer.cc |
+++ b/chrome/browser/data_use_measurement/data_use_web_contents_observer.cc |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h" |
+#include "base/memory/ptr_util.h" |
#include "chrome/browser/data_use_measurement/chrome_data_use_ascriber_service.h" |
#include "chrome/browser/data_use_measurement/chrome_data_use_ascriber_service_factory.h" |
#include "content/public/browser/navigation_handle.h" |
@@ -34,7 +35,8 @@ void DataUseWebContentsObserver::CreateForWebContents( |
// tied to a profile. Since profiles outlive |WebContents|, |service| will |
// outlive |DataUseWebContentsObserver|. |
web_contents->SetUserData( |
- UserDataKey(), new DataUseWebContentsObserver(web_contents, service)); |
+ UserDataKey(), |
+ base::WrapUnique(new DataUseWebContentsObserver(web_contents, service))); |
} |
DataUseWebContentsObserver::DataUseWebContentsObserver( |