| 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 "components/omnibox/browser/shortcuts_backend.h" | 5 #include "components/omnibox/browser/shortcuts_backend.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/bind_helpers.h" | 14 #include "base/bind_helpers.h" |
| 15 #include "base/guid.h" | 15 #include "base/guid.h" |
| 16 #include "base/i18n/case_conversion.h" | 16 #include "base/i18n/case_conversion.h" |
| 17 #include "base/metrics/histogram_macros.h" | 17 #include "base/metrics/histogram_macros.h" |
| 18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 19 #include "base/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
| 20 #include "components/history/core/browser/history_service.h" | 20 #include "components/history/core/browser/history_service.h" |
| 21 #include "components/omnibox/browser/autocomplete_input.h" | 21 #include "components/omnibox/browser/autocomplete_input.h" |
| 22 #include "components/omnibox/browser/autocomplete_match.h" | 22 #include "components/omnibox/browser/autocomplete_match.h" |
| 23 #include "components/omnibox/browser/autocomplete_match_type.h" | 23 #include "components/omnibox/browser/autocomplete_match_type.h" |
| 24 #include "components/omnibox/browser/autocomplete_result.h" | 24 #include "components/omnibox/browser/autocomplete_result.h" |
| 25 #include "components/omnibox/browser/base_search_provider.h" | 25 #include "components/omnibox/browser/base_search_provider.h" |
| 26 #include "components/omnibox/browser/omnibox_log.h" | 26 #include "components/omnibox/browser/omnibox_log.h" |
| 27 #include "components/omnibox/browser/shortcuts_database.h" | 27 #include "components/omnibox/browser/shortcuts_database.h" |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 shortcuts_map_.clear(); | 318 shortcuts_map_.clear(); |
| 319 guid_map_.clear(); | 319 guid_map_.clear(); |
| 320 FOR_EACH_OBSERVER(ShortcutsBackendObserver, observer_list_, | 320 FOR_EACH_OBSERVER(ShortcutsBackendObserver, observer_list_, |
| 321 OnShortcutsChanged()); | 321 OnShortcutsChanged()); |
| 322 return no_db_access_ || | 322 return no_db_access_ || |
| 323 db_runner_->PostTask( | 323 db_runner_->PostTask( |
| 324 FROM_HERE, base::Bind(base::IgnoreResult( | 324 FROM_HERE, base::Bind(base::IgnoreResult( |
| 325 &ShortcutsDatabase::DeleteAllShortcuts), | 325 &ShortcutsDatabase::DeleteAllShortcuts), |
| 326 db_.get())); | 326 db_.get())); |
| 327 } | 327 } |
| OLD | NEW |