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 |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "content/public/browser/notification_service.h" | 37 #include "content/public/browser/notification_service.h" |
38 #include "content/public/browser/notification_source.h" | 38 #include "content/public/browser/notification_source.h" |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 const float kConfidenceCutoff[] = { | 42 const float kConfidenceCutoff[] = { |
43 0.8f, | 43 0.8f, |
44 0.5f | 44 0.5f |
45 }; | 45 }; |
46 | 46 |
47 COMPILE_ASSERT(arraysize(kConfidenceCutoff) == | 47 static_assert(arraysize(kConfidenceCutoff) == |
48 predictors::AutocompleteActionPredictor::LAST_PREDICT_ACTION, | 48 predictors::AutocompleteActionPredictor::LAST_PREDICT_ACTION, |
49 ConfidenceCutoff_count_mismatch); | 49 "kConfidenceCutoff count should match LAST_PREDICT_ACTION"); |
50 | 50 |
51 const size_t kMinimumUserTextLength = 1; | 51 const size_t kMinimumUserTextLength = 1; |
52 const int kMinimumNumberOfHits = 3; | 52 const int kMinimumNumberOfHits = 3; |
53 | 53 |
54 enum DatabaseAction { | 54 enum DatabaseAction { |
55 DATABASE_ACTION_ADD, | 55 DATABASE_ACTION_ADD, |
56 DATABASE_ACTION_UPDATE, | 56 DATABASE_ACTION_UPDATE, |
57 DATABASE_ACTION_DELETE_SOME, | 57 DATABASE_ACTION_DELETE_SOME, |
58 DATABASE_ACTION_DELETE_ALL, | 58 DATABASE_ACTION_DELETE_ALL, |
59 DATABASE_ACTION_COUNT | 59 DATABASE_ACTION_COUNT |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 history_service_observer_.Remove(history_service); | 600 history_service_observer_.Remove(history_service); |
601 } | 601 } |
602 | 602 |
603 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch() { | 603 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch() { |
604 } | 604 } |
605 | 605 |
606 AutocompleteActionPredictor::TransitionalMatch::~TransitionalMatch() { | 606 AutocompleteActionPredictor::TransitionalMatch::~TransitionalMatch() { |
607 } | 607 } |
608 | 608 |
609 } // namespace predictors | 609 } // namespace predictors |
OLD | NEW |