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

Side by Side Diff: components/webdata/common/web_data_service_backend.cc

Issue 217613002: Misc. cleanup found while mucking with search engines code: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 | Annotate | Revision Log
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 "components/webdata/common/web_data_service_backend.h" 5 #include "components/webdata/common/web_data_service_backend.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "components/webdata/common/web_data_request_manager.h" 9 #include "components/webdata/common/web_data_request_manager.h"
10 #include "components/webdata/common/web_database.h" 10 #include "components/webdata/common/web_database.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return task.Run(db_.get()); 105 return task.Run(db_.get());
106 } 106 }
107 return scoped_ptr<WDTypedResult>(); 107 return scoped_ptr<WDTypedResult>();
108 } 108 }
109 109
110 WebDataServiceBackend::~WebDataServiceBackend() { 110 WebDataServiceBackend::~WebDataServiceBackend() {
111 ShutdownDatabase(); 111 ShutdownDatabase();
112 } 112 }
113 113
114 void WebDataServiceBackend::Commit() { 114 void WebDataServiceBackend::Commit() {
115 if (db_ && init_status_ == sql::INIT_OK) { 115 DCHECK(db_);
116 db_->CommitTransaction(); 116 DCHECK_EQ(sql::INIT_OK, init_status_);
117 db_->BeginTransaction(); 117 db_->CommitTransaction();
118 } else { 118 db_->BeginTransaction();
119 NOTREACHED() << "Commit scheduled after Shutdown()";
120 }
121 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698