| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/callback.h" | 5 #include "base/callback.h" |
| 6 #include "base/file_util.h" |
| 6 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 7 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 8 #include "base/thread.h" | 9 #include "base/thread.h" |
| 9 #include "chrome/browser/chrome_thread.h" | 10 #include "chrome/browser/chrome_thread.h" |
| 11 #include "chrome/browser/history/history.h" |
| 10 #include "chrome/browser/history/history_notifications.h" | 12 #include "chrome/browser/history/history_notifications.h" |
| 13 #include "chrome/browser/search_engines/template_url_model.h" |
| 11 #include "chrome/browser/webdata/web_database.h" | 14 #include "chrome/browser/webdata/web_database.h" |
| 12 #include "chrome/test/testing_profile.h" | 15 #include "chrome/test/testing_profile.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 17 |
| 15 using base::Time; | 18 using base::Time; |
| 16 using base::TimeDelta; | 19 using base::TimeDelta; |
| 17 | 20 |
| 18 // A Task used to coordinate when the database has finished processing | 21 // A Task used to coordinate when the database has finished processing |
| 19 // requests. See note in BlockTillServiceProcessesRequests for details. | 22 // requests. See note in BlockTillServiceProcessesRequests for details. |
| 20 // | 23 // |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 | 768 |
| 766 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS)->UnloadDatabase(); | 769 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS)->UnloadDatabase(); |
| 767 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS)->set_failed_init(true); | 770 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS)->set_failed_init(true); |
| 768 | 771 |
| 769 ResetModel(false); | 772 ResetModel(false); |
| 770 model_->Load(); | 773 model_->Load(); |
| 771 BlockTillServiceProcessesRequests(); | 774 BlockTillServiceProcessesRequests(); |
| 772 | 775 |
| 773 ASSERT_TRUE(model_->GetDefaultSearchProvider()); | 776 ASSERT_TRUE(model_->GetDefaultSearchProvider()); |
| 774 } | 777 } |
| OLD | NEW |