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_provider.h" | 5 #include "chrome/browser/autocomplete/shortcuts_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/i18n/break_iterator.h" | 12 #include "base/i18n/break_iterator.h" |
13 #include "base/i18n/case_conversion.h" | 13 #include "base/i18n/case_conversion.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
18 #include "base/time.h" | 18 #include "base/time.h" |
19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
20 #include "chrome/browser/history/history.h" | 20 #include "chrome/browser/history/history.h" |
21 #include "chrome/browser/history/history_notifications.h" | 21 #include "chrome/browser/history/history_notifications.h" |
22 #include "chrome/browser/net/url_fixer_upper.h" | 22 #include "chrome/browser/net/url_fixer_upper.h" |
23 #include "chrome/browser/prefs/pref_service.h" | 23 #include "chrome/browser/prefs/pref_service.h" |
24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/common/guid.h" | |
26 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
27 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
28 #include "googleurl/src/url_parse.h" | 27 #include "googleurl/src/url_parse.h" |
29 #include "googleurl/src/url_util.h" | 28 #include "googleurl/src/url_util.h" |
30 #include "net/base/escape.h" | 29 #include "net/base/escape.h" |
31 #include "net/base/net_util.h" | 30 #include "net/base/net_util.h" |
32 | 31 |
33 namespace { | 32 namespace { |
34 | 33 |
35 class RemoveMatchPredicate { | 34 class RemoveMatchPredicate { |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 } | 302 } |
304 | 303 |
305 void ShortcutsProvider::set_shortcuts_backend( | 304 void ShortcutsProvider::set_shortcuts_backend( |
306 history::ShortcutsBackend* shortcuts_backend) { | 305 history::ShortcutsBackend* shortcuts_backend) { |
307 DCHECK(shortcuts_backend); | 306 DCHECK(shortcuts_backend); |
308 shortcuts_backend_ = shortcuts_backend; | 307 shortcuts_backend_ = shortcuts_backend; |
309 shortcuts_backend_->AddObserver(this); | 308 shortcuts_backend_->AddObserver(this); |
310 if (shortcuts_backend_->initialized()) | 309 if (shortcuts_backend_->initialized()) |
311 initialized_ = true; | 310 initialized_ = true; |
312 } | 311 } |
OLD | NEW |