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

Unified Diff: content/renderer/history_entry.h

Issue 2705073003: Remove ScopedVector from content/renderer/. (Closed)
Patch Set: Rebase only 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
« no previous file with comments | « content/renderer/gpu/queue_message_swap_promise_unittest.cc ('k') | content/renderer/history_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/history_entry.h
diff --git a/content/renderer/history_entry.h b/content/renderer/history_entry.h
index 182cfe2d1506da8a9ff45db1de4eaebd93333921..c1a78fc2b34277606daeae6ee94ef8b0bc9233d0 100644
--- a/content/renderer/history_entry.h
+++ b/content/renderer/history_entry.h
@@ -36,9 +36,10 @@
#define CONTENT_RENDERER_HISTORY_ENTRY_H_
#include <memory>
+#include <vector>
#include "base/containers/hash_tables.h"
-#include "base/memory/scoped_vector.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
@@ -50,7 +51,7 @@ class RenderViewImpl;
class CONTENT_EXPORT HistoryEntry {
public:
- class HistoryNode {
+ class CONTENT_EXPORT HistoryNode {
public:
HistoryNode(const base::WeakPtr<HistoryEntry>& entry,
const blink::WebHistoryItem& item);
@@ -58,14 +59,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(
+ 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,12 +76,14 @@ 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
// has ever known by when it is destroyed.
std::vector<std::string> unique_names_;
+
+ DISALLOW_COPY_AND_ASSIGN(HistoryNode);
};
HistoryEntry(const blink::WebHistoryItem& root);
@@ -103,6 +107,8 @@ class CONTENT_EXPORT HistoryEntry {
UniqueNamesToItems unique_names_to_items_;
base::WeakPtrFactory<HistoryEntry> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(HistoryEntry);
};
} // namespace content
« no previous file with comments | « content/renderer/gpu/queue_message_swap_promise_unittest.cc ('k') | content/renderer/history_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698