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

Side by Side Diff: content/renderer/history_serialization.cc

Issue 2705073003: Remove ScopedVector from content/renderer/. (Closed)
Patch Set: Rebase only Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/history_serialization.h" 5 #include "content/renderer/history_serialization.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/nullable_string16.h" 9 #include "base/strings/nullable_string16.h"
10 #include "content/child/web_url_request_util.h" 10 #include "content/child/web_url_request_util.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 void RecursivelyGenerateFrameState( 69 void RecursivelyGenerateFrameState(
70 HistoryEntry::HistoryNode* node, 70 HistoryEntry::HistoryNode* node,
71 ExplodedFrameState* state, 71 ExplodedFrameState* state,
72 std::vector<base::NullableString16>* referenced_files) { 72 std::vector<base::NullableString16>* referenced_files) {
73 GenerateFrameStateFromItem(node->item(), state); 73 GenerateFrameStateFromItem(node->item(), state);
74 ToNullableString16Vector(node->item().getReferencedFilePaths(), 74 ToNullableString16Vector(node->item().getReferencedFilePaths(),
75 referenced_files); 75 referenced_files);
76 76
77 std::vector<HistoryEntry::HistoryNode*>& children = node->children(); 77 std::vector<HistoryEntry::HistoryNode*> children = node->children();
78 state->children.resize(children.size()); 78 state->children.resize(children.size());
79 for (size_t i = 0; i < children.size(); ++i) { 79 for (size_t i = 0; i < children.size(); ++i) {
80 RecursivelyGenerateFrameState(children[i], &state->children[i], 80 RecursivelyGenerateFrameState(children[i], &state->children[i],
81 referenced_files); 81 referenced_files);
82 } 82 }
83 } 83 }
84 84
85 void RecursivelyGenerateHistoryItem(const ExplodedFrameState& state, 85 void RecursivelyGenerateHistoryItem(const ExplodedFrameState& state,
86 HistoryEntry::HistoryNode* node) { 86 HistoryEntry::HistoryNode* node) {
87 WebHistoryItem item; 87 WebHistoryItem item;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (!DecodePageState(page_state.ToEncodedData(), &state)) 154 if (!DecodePageState(page_state.ToEncodedData(), &state))
155 return std::unique_ptr<HistoryEntry>(); 155 return std::unique_ptr<HistoryEntry>();
156 156
157 std::unique_ptr<HistoryEntry> entry(new HistoryEntry()); 157 std::unique_ptr<HistoryEntry> entry(new HistoryEntry());
158 RecursivelyGenerateHistoryItem(state.top, entry->root_history_node()); 158 RecursivelyGenerateHistoryItem(state.top, entry->root_history_node());
159 159
160 return entry; 160 return entry;
161 } 161 }
162 162
163 } // namespace content 163 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/history_entry.cc ('k') | content/renderer/image_downloader/image_downloader_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698