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

Side by Side Diff: chrome/browser/webdata/web_data_service.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 | « no previous file | chrome/browser/webdata/web_database_service_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_data_service.h" 5 #include "chrome/browser/webdata/web_data_service.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/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 WDKeywordsResult::~WDKeywordsResult() {} 78 WDKeywordsResult::~WDKeywordsResult() {}
79 79
80 WebDataService::WebDataService(WebDatabaseService* wdbs) 80 WebDataService::WebDataService(WebDatabaseService* wdbs)
81 : wdbs_(wdbs), 81 : wdbs_(wdbs),
82 db_loaded_(false), 82 db_loaded_(false),
83 autocomplete_syncable_service_(NULL), 83 autocomplete_syncable_service_(NULL),
84 autofill_profile_syncable_service_(NULL) { 84 autofill_profile_syncable_service_(NULL) {
85 // WebDataService requires DB thread if instantiated. 85 // WebDataService requires DB thread if instantiated.
86 // Set WebDataServiceFactory::GetInstance()->SetTestingFactory(&profile, NULL) 86 // Set WebDataServiceFactory::GetInstance()->SetTestingFactory(&profile, NULL)
87 // if you do not want to instantiate WebDataService in your test. 87 // if you do not want to instantiate WebDataService in your test.
88 DCHECK(!ProfileManager::IsImportProcess(*CommandLine::ForCurrentProcess()));
89 DCHECK(BrowserThread::IsWellKnownThread(BrowserThread::DB)); 88 DCHECK(BrowserThread::IsWellKnownThread(BrowserThread::DB));
90 } 89 }
91 90
92 // static 91 // static
93 void WebDataService::NotifyOfMultipleAutofillChanges( 92 void WebDataService::NotifyOfMultipleAutofillChanges(
94 WebDataService* web_data_service) { 93 WebDataService* web_data_service) {
95 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 94 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
96 95
97 if (!web_data_service) 96 if (!web_data_service)
98 return; 97 return;
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 void WebDataService::DestroyAutofillCreditCardResult( 803 void WebDataService::DestroyAutofillCreditCardResult(
805 const WDTypedResult* result) { 804 const WDTypedResult* result) {
806 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT); 805 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT);
807 const WDResult<std::vector<CreditCard*> >* r = 806 const WDResult<std::vector<CreditCard*> >* r =
808 static_cast<const WDResult<std::vector<CreditCard*> >*>(result); 807 static_cast<const WDResult<std::vector<CreditCard*> >*>(result);
809 808
810 std::vector<CreditCard*> credit_cards = r->GetValue(); 809 std::vector<CreditCard*> credit_cards = r->GetValue();
811 STLDeleteElements(&credit_cards); 810 STLDeleteElements(&credit_cards);
812 } 811 }
813 812
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/webdata/web_database_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698