| 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/predictors/autocomplete_action_predictor.h" | 5 #include "chrome/browser/predictors/autocomplete_action_predictor.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/guid.h" | 12 #include "base/guid.h" |
| 13 #include "base/i18n/case_conversion.h" | 13 #include "base/i18n/case_conversion.h" |
| 14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "chrome/browser/autocomplete/autocomplete_match.h" | 18 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 19 #include "chrome/browser/autocomplete/autocomplete_result.h" | 19 #include "chrome/browser/autocomplete/autocomplete_result.h" |
| 20 #include "chrome/browser/chrome_notification_types.h" |
| 20 #include "chrome/browser/history/history_notifications.h" | 21 #include "chrome/browser/history/history_notifications.h" |
| 21 #include "chrome/browser/history/history_service.h" | 22 #include "chrome/browser/history/history_service.h" |
| 22 #include "chrome/browser/history/history_service_factory.h" | 23 #include "chrome/browser/history/history_service_factory.h" |
| 23 #include "chrome/browser/history/in_memory_database.h" | 24 #include "chrome/browser/history/in_memory_database.h" |
| 24 #include "chrome/browser/omnibox/omnibox_log.h" | 25 #include "chrome/browser/omnibox/omnibox_log.h" |
| 25 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" | 26 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" |
| 26 #include "chrome/browser/predictors/predictor_database.h" | 27 #include "chrome/browser/predictors/predictor_database.h" |
| 27 #include "chrome/browser/predictors/predictor_database_factory.h" | 28 #include "chrome/browser/predictors/predictor_database_factory.h" |
| 28 #include "chrome/browser/prerender/prerender_field_trial.h" | 29 #include "chrome/browser/prerender/prerender_field_trial.h" |
| 29 #include "chrome/browser/prerender/prerender_handle.h" | 30 #include "chrome/browser/prerender/prerender_handle.h" |
| 30 #include "chrome/browser/prerender/prerender_manager.h" | 31 #include "chrome/browser/prerender/prerender_manager.h" |
| 31 #include "chrome/browser/prerender/prerender_manager_factory.h" | 32 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 32 #include "chrome/browser/profiles/profile.h" | 33 #include "chrome/browser/profiles/profile.h" |
| 33 #include "chrome/common/chrome_notification_types.h" | |
| 34 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
| 35 #include "content/public/browser/notification_details.h" | 35 #include "content/public/browser/notification_details.h" |
| 36 #include "content/public/browser/notification_service.h" | 36 #include "content/public/browser/notification_service.h" |
| 37 #include "content/public/browser/notification_source.h" | 37 #include "content/public/browser/notification_source.h" |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 const float kConfidenceCutoff[] = { | 41 const float kConfidenceCutoff[] = { |
| 42 0.8f, | 42 0.8f, |
| 43 0.5f | 43 0.5f |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 return number_of_hits / (number_of_hits + value.number_of_misses); | 575 return number_of_hits / (number_of_hits + value.number_of_misses); |
| 576 } | 576 } |
| 577 | 577 |
| 578 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch() { | 578 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch() { |
| 579 } | 579 } |
| 580 | 580 |
| 581 AutocompleteActionPredictor::TransitionalMatch::~TransitionalMatch() { | 581 AutocompleteActionPredictor::TransitionalMatch::~TransitionalMatch() { |
| 582 } | 582 } |
| 583 | 583 |
| 584 } // namespace predictors | 584 } // namespace predictors |
| OLD | NEW |