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

Unified Diff: content/renderer/history_entry.h

Issue 2705073003: Remove ScopedVector from content/renderer/. (Closed)
Patch Set: Created 3 years, 10 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: content/renderer/history_entry.h
diff --git a/content/renderer/history_entry.h b/content/renderer/history_entry.h
index 182cfe2d1506da8a9ff45db1de4eaebd93333921..4ba11f29d6aed4f34165b46f8c33cb8261534932 100644
--- a/content/renderer/history_entry.h
+++ b/content/renderer/history_entry.h
@@ -36,9 +36,9 @@
#define CONTENT_RENDERER_HISTORY_ENTRY_H_
#include <memory>
+#include <vector>
#include "base/containers/hash_tables.h"
-#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
@@ -58,14 +58,15 @@ class CONTENT_EXPORT HistoryEntry {
HistoryNode* AddChild(const blink::WebHistoryItem& item);
HistoryNode* AddChild();
- HistoryNode* CloneAndReplace(const base::WeakPtr<HistoryEntry>& new_entry,
- const blink::WebHistoryItem& new_item,
- bool clone_children_of_target,
- RenderFrameImpl* target_frame,
- RenderFrameImpl* current_frame);
+ std::unique_ptr<HistoryNode> CloneAndReplace(
Avi (use Gerrit) 2017/02/21 16:01:36 👍
+ const base::WeakPtr<HistoryEntry>& new_entry,
+ const blink::WebHistoryItem& new_item,
+ bool clone_children_of_target,
+ RenderFrameImpl* target_frame,
+ RenderFrameImpl* current_frame);
blink::WebHistoryItem& item() { return item_; }
void set_item(const blink::WebHistoryItem& item);
- std::vector<HistoryNode*>& children() const { return children_->get(); }
+ std::vector<HistoryNode*> children() const;
void RemoveChildren();
private:
@@ -74,7 +75,7 @@ class CONTENT_EXPORT HistoryEntry {
// a dying HistoryEntry, or do unnecessary work when the whole entry is
// being destroyed.
base::WeakPtr<HistoryEntry> entry_;
- std::unique_ptr<ScopedVector<HistoryNode>> children_;
+ std::vector<std::unique_ptr<HistoryNode>> children_;
blink::WebHistoryItem item_;
// We need to track multiple names because the name of a frame can change
// over its lifetime. This allows us to clean up all of the names this node

Powered by Google App Engine
This is Rietveld 408576698