Chromium Code Reviews| Index: chrome/browser/renderer_host/chrome_navigation_data.cc |
| diff --git a/chrome/browser/renderer_host/chrome_navigation_data.cc b/chrome/browser/renderer_host/chrome_navigation_data.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d1ac700e91eee1cfa6bb4a89e60ee52b7caf54ca |
| --- /dev/null |
| +++ b/chrome/browser/renderer_host/chrome_navigation_data.cc |
| @@ -0,0 +1,19 @@ |
| +// Copyright 2016 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. |
| + |
| +#include "chrome/browser/renderer_host/chrome_navigation_data.h" |
| + |
| +#include "base/memory/ptr_util.h" |
| +#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h" |
| + |
| +ChromeNavigationData::ChromeNavigationData() {} |
| + |
| +ChromeNavigationData::~ChromeNavigationData() {} |
| + |
| +std::unique_ptr<content::NavigationData> ChromeNavigationData::Clone() const { |
| + ChromeNavigationData* copy = new ChromeNavigationData(); |
|
nasko
2016/04/26 20:18:39
Why keep a raw pointer? Just use the unique_ptr.
RyanSturm
2016/04/27 23:27:46
Done.
|
| + if (data_reduction_proxy_data_) |
| + copy->SetDataReductionProxyData(data_reduction_proxy_data_->DeepCopy()); |
| + return base::WrapUnique(copy); |
|
nasko
2016/04/26 20:18:39
You should WrapUnique the return value of the allo
RyanSturm
2016/04/27 23:27:46
Done.
|
| +} |