Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: chrome/browser/predictors/autocomplete_action_predictor.cc

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/mac/relauncher.cc ('k') | chrome/browser/prefs/proxy_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/mac/relauncher.cc ('k') | chrome/browser/prefs/proxy_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698