| 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/autocomplete/in_memory_url_index.h" | 5 #include "components/omnibox/in_memory_url_index.h" |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "chrome/browser/autocomplete/url_index_private_data.h" | |
| 11 #include "components/history/core/browser/history_service.h" | 10 #include "components/history/core/browser/history_service.h" |
| 12 #include "components/history/core/browser/url_database.h" | 11 #include "components/history/core/browser/url_database.h" |
| 12 #include "components/omnibox/url_index_private_data.h" |
| 13 | 13 |
| 14 using in_memory_url_index::InMemoryURLIndexCacheItem; | 14 using in_memory_url_index::InMemoryURLIndexCacheItem; |
| 15 | 15 |
| 16 // Initializes a whitelist of URL schemes. | 16 // Initializes a whitelist of URL schemes. |
| 17 void InitializeSchemeWhitelist( | 17 void InitializeSchemeWhitelist( |
| 18 std::set<std::string>* whitelist, | 18 std::set<std::string>* whitelist, |
| 19 const std::set<std::string>& client_schemes_to_whitelist) { | 19 const std::set<std::string>& client_schemes_to_whitelist) { |
| 20 DCHECK(whitelist); | 20 DCHECK(whitelist); |
| 21 if (!whitelist->empty()) | 21 if (!whitelist->empty()) |
| 22 return; // Nothing to do, already initialized. | 22 return; // Nothing to do, already initialized. |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 task_runner_->PostTask( | 335 task_runner_->PostTask( |
| 336 FROM_HERE, | 336 FROM_HERE, |
| 337 base::Bind(base::IgnoreResult(base::DeleteFile), path, false)); | 337 base::Bind(base::IgnoreResult(base::DeleteFile), path, false)); |
| 338 } | 338 } |
| 339 } | 339 } |
| 340 | 340 |
| 341 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) { | 341 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) { |
| 342 if (save_cache_observer_) | 342 if (save_cache_observer_) |
| 343 save_cache_observer_->OnCacheSaveFinished(succeeded); | 343 save_cache_observer_->OnCacheSaveFinished(succeeded); |
| 344 } | 344 } |
| OLD | NEW |