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

Side by Side Diff: chrome/browser/webdata/web_database_service_impl.cc

Issue 12656004: Removes now-useless DCHECKs as per discussion with atwilson@. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « chrome/browser/webdata/web_data_service.cc ('k') | no next file » | 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 "chrome/browser/webdata/web_database_service_impl.h" 5 #include "chrome/browser/webdata/web_database_service_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "chrome/browser/api/webdata/web_data_results.h" 10 #include "chrome/browser/api/webdata/web_data_results.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 db_->CommitTransaction(); 175 db_->CommitTransaction();
176 db_->BeginTransaction(); 176 db_->BeginTransaction();
177 } else { 177 } else {
178 NOTREACHED() << "Commit scheduled after Shutdown()"; 178 NOTREACHED() << "Commit scheduled after Shutdown()";
179 } 179 }
180 } 180 }
181 181
182 //////////////////////////////////////////////////////////////////////////////// 182 ////////////////////////////////////////////////////////////////////////////////
183 WebDatabaseServiceImpl::WebDatabaseServiceImpl(const base::FilePath& path) 183 WebDatabaseServiceImpl::WebDatabaseServiceImpl(const base::FilePath& path)
184 : path_(path) { 184 : path_(path) {
185 // Do not start WebDatabaseService on ImportProcess.
186 DCHECK(!ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess()));
187 // WebDatabaseService should be instantiated on UI thread. 185 // WebDatabaseService should be instantiated on UI thread.
188 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 186 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
189 // WebDatabaseService requires DB thread if instantiated. 187 // WebDatabaseService requires DB thread if instantiated.
190 DCHECK(BrowserThread::IsWellKnownThread(BrowserThread::DB)); 188 DCHECK(BrowserThread::IsWellKnownThread(BrowserThread::DB));
191 } 189 }
192 190
193 WebDatabaseServiceImpl::~WebDatabaseServiceImpl() { 191 WebDatabaseServiceImpl::~WebDatabaseServiceImpl() {
194 wdbs_internal_ = NULL; 192 wdbs_internal_ = NULL;
195 } 193 }
196 194
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void WebDatabaseServiceImpl::CancelRequest(WebDataServiceBase::Handle h) { 259 void WebDatabaseServiceImpl::CancelRequest(WebDataServiceBase::Handle h) {
262 if (wdbs_internal_) 260 if (wdbs_internal_)
263 wdbs_internal_->request_manager()->CancelRequest(h); 261 wdbs_internal_->request_manager()->CancelRequest(h);
264 } 262 }
265 263
266 // Testing 264 // Testing
267 void WebDatabaseServiceImpl::set_init_complete(bool complete) { 265 void WebDatabaseServiceImpl::set_init_complete(bool complete) {
268 if (wdbs_internal_) 266 if (wdbs_internal_)
269 wdbs_internal_->set_init_complete(complete); 267 wdbs_internal_->set_init_complete(complete);
270 } 268 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698