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

Side by Side Diff: sql/recovery.cc

Issue 1550693002: Global conversion of Pass()→std::move() on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « sql/mojo/vfs_unittest.cc ('k') | sql/recovery_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "sql/recovery.h" 5 #include "sql/recovery.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 scoped_ptr<Recovery> Recovery::Begin( 108 scoped_ptr<Recovery> Recovery::Begin(
109 Connection* connection, 109 Connection* connection,
110 const base::FilePath& db_path) { 110 const base::FilePath& db_path) {
111 scoped_ptr<Recovery> r(new Recovery(connection)); 111 scoped_ptr<Recovery> r(new Recovery(connection));
112 if (!r->Init(db_path)) { 112 if (!r->Init(db_path)) {
113 // TODO(shess): Should Init() failure result in Raze()? 113 // TODO(shess): Should Init() failure result in Raze()?
114 r->Shutdown(POISON); 114 r->Shutdown(POISON);
115 return scoped_ptr<Recovery>(); 115 return scoped_ptr<Recovery>();
116 } 116 }
117 117
118 return r.Pass(); 118 return r;
119 } 119 }
120 120
121 // static 121 // static
122 bool Recovery::Recovered(scoped_ptr<Recovery> r) { 122 bool Recovery::Recovered(scoped_ptr<Recovery> r) {
123 return r->Backup(); 123 return r->Backup();
124 } 124 }
125 125
126 // static 126 // static
127 void Recovery::Unrecoverable(scoped_ptr<Recovery> r) { 127 void Recovery::Unrecoverable(scoped_ptr<Recovery> r) {
128 CHECK(r->db_); 128 CHECK(r->db_);
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } 527 }
528 return false; 528 return false;
529 } 529 }
530 530
531 RecordRecoveryEvent(RECOVERY_SUCCESS_META_VERSION); 531 RecordRecoveryEvent(RECOVERY_SUCCESS_META_VERSION);
532 *version = recovery_version.ColumnInt(0); 532 *version = recovery_version.ColumnInt(0);
533 return true; 533 return true;
534 } 534 }
535 535
536 } // namespace sql 536 } // namespace sql
OLDNEW
« no previous file with comments | « sql/mojo/vfs_unittest.cc ('k') | sql/recovery_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698