Chromium Code Reviews| Index: components/sessions/content/content_serialized_navigation_builder.cc |
| diff --git a/components/sessions/content/content_serialized_navigation_builder.cc b/components/sessions/content/content_serialized_navigation_builder.cc |
| index d371994423f90f8b1ee3914acbf10ee4d1db4931..47eb7c0de4cecf1ad18ecbf4fdd8eff53dba16d6 100644 |
| --- a/components/sessions/content/content_serialized_navigation_builder.cc |
| +++ b/components/sessions/content/content_serialized_navigation_builder.cc |
| @@ -85,19 +85,18 @@ ContentSerializedNavigationBuilder::ToNavigationEntry( |
| } |
| // static |
| -ScopedVector<content::NavigationEntry> |
| +std::vector<scoped_ptr<content::NavigationEntry>> |
| ContentSerializedNavigationBuilder::ToNavigationEntries( |
| const std::vector<SerializedNavigationEntry>& navigations, |
| content::BrowserContext* browser_context) { |
| int page_id = 0; |
| - ScopedVector<content::NavigationEntry> entries; |
| - for (std::vector<SerializedNavigationEntry>::const_iterator |
| - it = navigations.begin(); it != navigations.end(); ++it) { |
| - entries.push_back( |
| - ToNavigationEntry(&(*it), page_id, browser_context).release()); |
| + std::vector<scoped_ptr<content::NavigationEntry>> entries; |
| + entries.reserve(navigations.size()); |
| + for (const auto& navigation : navigations) { |
| + entries.push_back(ToNavigationEntry(&navigation, page_id, browser_context)); |
| ++page_id; |
| } |
| - return entries.Pass(); |
| + return entries; |
|
sky
2015/11/13 16:33:21
The new world is going to take some getting use to
|
| } |
| } // namespace sessions |