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/shortcuts_backend.h" | 5 #include "chrome/browser/autocomplete/shortcuts_backend.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/guid.h" | 13 #include "base/guid.h" |
14 #include "base/i18n/case_conversion.h" | 14 #include "base/i18n/case_conversion.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "chrome/browser/autocomplete/shortcuts_database.h" |
16 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
17 #include "chrome/browser/history/history_notifications.h" | 18 #include "chrome/browser/history/history_notifications.h" |
18 #include "chrome/browser/history/history_service.h" | 19 #include "chrome/browser/history/history_service.h" |
19 #include "chrome/browser/history/shortcuts_database.h" | |
20 #include "chrome/browser/omnibox/omnibox_log.h" | 20 #include "chrome/browser/omnibox/omnibox_log.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/search_engines/template_url_service_factory.h" | 22 #include "chrome/browser/search_engines/template_url_service_factory.h" |
23 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" | 23 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
24 #include "chrome/common/chrome_constants.h" | 24 #include "chrome/common/chrome_constants.h" |
25 #include "components/omnibox/autocomplete_input.h" | 25 #include "components/omnibox/autocomplete_input.h" |
26 #include "components/omnibox/autocomplete_match.h" | 26 #include "components/omnibox/autocomplete_match.h" |
27 #include "components/omnibox/autocomplete_match_type.h" | 27 #include "components/omnibox/autocomplete_match_type.h" |
28 #include "components/omnibox/autocomplete_result.h" | 28 #include "components/omnibox/autocomplete_result.h" |
29 #include "components/omnibox/base_search_provider.h" | 29 #include "components/omnibox/base_search_provider.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 guid_map_.clear(); | 328 guid_map_.clear(); |
329 FOR_EACH_OBSERVER(ShortcutsBackendObserver, observer_list_, | 329 FOR_EACH_OBSERVER(ShortcutsBackendObserver, observer_list_, |
330 OnShortcutsChanged()); | 330 OnShortcutsChanged()); |
331 return no_db_access_ || | 331 return no_db_access_ || |
332 BrowserThread::PostTask( | 332 BrowserThread::PostTask( |
333 BrowserThread::DB, FROM_HERE, | 333 BrowserThread::DB, FROM_HERE, |
334 base::Bind(base::IgnoreResult( | 334 base::Bind(base::IgnoreResult( |
335 &history::ShortcutsDatabase::DeleteAllShortcuts), | 335 &history::ShortcutsDatabase::DeleteAllShortcuts), |
336 db_.get())); | 336 db_.get())); |
337 } | 337 } |
OLD | NEW |