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

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

Issue 1873783003: Convert //content/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « content/renderer/history_serialization.h ('k') | content/renderer/in_process_renderer_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/common/page_state_serialization.h" 9 #include "content/common/page_state_serialization.h"
10 #include "content/public/common/page_state.h" 10 #include "content/public/common/page_state.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 &state.referenced_files); 191 &state.referenced_files);
192 GenerateFrameStateFromItem(item, &state.top); 192 GenerateFrameStateFromItem(item, &state.top);
193 193
194 std::string encoded_data; 194 std::string encoded_data;
195 if (!EncodePageState(state, &encoded_data)) 195 if (!EncodePageState(state, &encoded_data))
196 return PageState(); 196 return PageState();
197 197
198 return PageState::CreateFromEncodedData(encoded_data); 198 return PageState::CreateFromEncodedData(encoded_data);
199 } 199 }
200 200
201 scoped_ptr<HistoryEntry> PageStateToHistoryEntry(const PageState& page_state) { 201 std::unique_ptr<HistoryEntry> PageStateToHistoryEntry(
202 const PageState& page_state) {
202 ExplodedPageState state; 203 ExplodedPageState state;
203 if (!DecodePageState(page_state.ToEncodedData(), &state)) 204 if (!DecodePageState(page_state.ToEncodedData(), &state))
204 return scoped_ptr<HistoryEntry>(); 205 return std::unique_ptr<HistoryEntry>();
205 206
206 scoped_ptr<HistoryEntry> entry(new HistoryEntry()); 207 std::unique_ptr<HistoryEntry> entry(new HistoryEntry());
207 RecursivelyGenerateHistoryItem(state.top, entry->root_history_node()); 208 RecursivelyGenerateHistoryItem(state.top, entry->root_history_node());
208 209
209 return entry; 210 return entry;
210 } 211 }
211 212
212 } // namespace content 213 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/history_serialization.h ('k') | content/renderer/in_process_renderer_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698