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

Unified Diff: chrome/browser/sessions/session_backend.cc

Issue 689143002: Minor tweak to Session* to use base::Passed so ownership is clearer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 6 years, 2 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 | « chrome/browser/sessions/session_backend.h ('k') | chrome/browser/sessions/session_backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_backend.cc
diff --git a/chrome/browser/sessions/session_backend.cc b/chrome/browser/sessions/session_backend.cc
index 825b8114d4a966f5ec17c1be118f2fa0c6d08f8f..dc0b66e5306ea4b098e85444a9e30db09a5a7c49 100644
--- a/chrome/browser/sessions/session_backend.cc
+++ b/chrome/browser/sessions/session_backend.cc
@@ -221,7 +221,7 @@ void SessionBackend::Init() {
}
void SessionBackend::AppendCommands(
- ScopedVector<SessionCommand>* commands,
+ ScopedVector<SessionCommand> commands,
bool reset_first) {
Init();
// Make sure and check current_session_file_, if opening the file failed
@@ -232,12 +232,10 @@ void SessionBackend::AppendCommands(
}
// Need to check current_session_file_ again, ResetFile may fail.
if (current_session_file_.get() && current_session_file_->IsValid() &&
- !AppendCommandsToFile(current_session_file_.get(), *commands)) {
+ !AppendCommandsToFile(current_session_file_.get(), commands)) {
current_session_file_.reset(NULL);
}
empty_file_ = false;
- // Deleting the ScopedVector will also delete its elements.
- delete commands;
}
void SessionBackend::ReadLastSessionCommands(
« no previous file with comments | « chrome/browser/sessions/session_backend.h ('k') | chrome/browser/sessions/session_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698