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/autocomplete_result.h" | 16 #include "chrome/browser/autocomplete/autocomplete_result.h" |
17 #include "chrome/browser/autocomplete/base_search_provider.h" | 17 #include "chrome/browser/autocomplete/base_search_provider.h" |
18 #include "chrome/browser/chrome_notification_types.h" | 18 #include "chrome/browser/chrome_notification_types.h" |
19 #include "chrome/browser/history/history_notifications.h" | 19 #include "chrome/browser/history/history_notifications.h" |
20 #include "chrome/browser/history/history_service.h" | 20 #include "chrome/browser/history/history_service.h" |
21 #include "chrome/browser/history/shortcuts_database.h" | 21 #include "chrome/browser/history/shortcuts_database.h" |
22 #include "chrome/browser/omnibox/omnibox_log.h" | 22 #include "chrome/browser/omnibox/omnibox_log.h" |
23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/search_engines/template_url_service_factory.h" | 24 #include "chrome/browser/search_engines/template_url_service_factory.h" |
25 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" | 25 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
26 #include "chrome/common/chrome_constants.h" | 26 #include "chrome/common/chrome_constants.h" |
27 #include "components/autocomplete/autocomplete_input.h" | 27 #include "components/omnibox/autocomplete_input.h" |
28 #include "components/autocomplete/autocomplete_match.h" | 28 #include "components/omnibox/autocomplete_match.h" |
29 #include "components/autocomplete/autocomplete_match_type.h" | 29 #include "components/omnibox/autocomplete_match_type.h" |
30 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
31 #include "content/public/browser/notification_details.h" | 31 #include "content/public/browser/notification_details.h" |
32 #include "content/public/browser/notification_source.h" | 32 #include "content/public/browser/notification_source.h" |
33 #include "extensions/browser/notification_types.h" | 33 #include "extensions/browser/notification_types.h" |
34 #include "extensions/common/extension.h" | 34 #include "extensions/common/extension.h" |
35 | 35 |
36 using content::BrowserThread; | 36 using content::BrowserThread; |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 guid_map_.clear(); | 321 guid_map_.clear(); |
322 FOR_EACH_OBSERVER(ShortcutsBackendObserver, observer_list_, | 322 FOR_EACH_OBSERVER(ShortcutsBackendObserver, observer_list_, |
323 OnShortcutsChanged()); | 323 OnShortcutsChanged()); |
324 return no_db_access_ || | 324 return no_db_access_ || |
325 BrowserThread::PostTask( | 325 BrowserThread::PostTask( |
326 BrowserThread::DB, FROM_HERE, | 326 BrowserThread::DB, FROM_HERE, |
327 base::Bind(base::IgnoreResult( | 327 base::Bind(base::IgnoreResult( |
328 &history::ShortcutsDatabase::DeleteAllShortcuts), | 328 &history::ShortcutsDatabase::DeleteAllShortcuts), |
329 db_.get())); | 329 db_.get())); |
330 } | 330 } |
OLD | NEW |