OLD | NEW |
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/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetween( | 324 void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetween( |
325 const Time& delete_begin, | 325 const Time& delete_begin, |
326 const Time& delete_end) { | 326 const Time& delete_end) { |
327 ScheduleDBTask(FROM_HERE, Bind( | 327 ScheduleDBTask(FROM_HERE, Bind( |
328 &WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl, | 328 &WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl, |
329 this, delete_begin, delete_end)); | 329 this, delete_begin, delete_end)); |
330 } | 330 } |
331 | 331 |
332 WebDataService::~WebDataService() { | 332 WebDataService::~WebDataService() { |
333 if (is_running_ && db_) { | 333 if (is_running_ && db_) { |
334 DLOG_ASSERT("WebDataService dtor called without Shutdown"); | 334 NOTREACHED() << "WebDataService dtor called without Shutdown"; |
335 NOTREACHED(); | |
336 } | 335 } |
337 } | 336 } |
338 | 337 |
339 bool WebDataService::InitWithPath(const base::FilePath& path) { | 338 bool WebDataService::InitWithPath(const base::FilePath& path) { |
340 path_ = path; | 339 path_ = path; |
341 is_running_ = true; | 340 is_running_ = true; |
342 | 341 |
343 ScheduleTask(FROM_HERE, | 342 ScheduleTask(FROM_HERE, |
344 Bind(&WebDataService::InitializeDatabaseIfNecessary, this)); | 343 Bind(&WebDataService::InitializeDatabaseIfNecessary, this)); |
345 ScheduleTask(FROM_HERE, | 344 ScheduleTask(FROM_HERE, |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 | 945 |
947 void WebDataService::DestroyAutofillCreditCardResult( | 946 void WebDataService::DestroyAutofillCreditCardResult( |
948 const WDTypedResult* result) { | 947 const WDTypedResult* result) { |
949 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT); | 948 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT); |
950 const WDResult<std::vector<CreditCard*> >* r = | 949 const WDResult<std::vector<CreditCard*> >* r = |
951 static_cast<const WDResult<std::vector<CreditCard*> >*>(result); | 950 static_cast<const WDResult<std::vector<CreditCard*> >*>(result); |
952 | 951 |
953 std::vector<CreditCard*> credit_cards = r->GetValue(); | 952 std::vector<CreditCard*> credit_cards = r->GetValue(); |
954 STLDeleteElements(&credit_cards); | 953 STLDeleteElements(&credit_cards); |
955 } | 954 } |
OLD | NEW |