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

Side by Side Diff: chrome/browser/ui/webui/predictors/predictors_handler.cc

Issue 10453013: Remove hit weight experiment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trying rebase again - missing base file? Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/predictors/predictors.js ('k') | no next file » | 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/ui/webui/predictors/predictors_handler.h" 5 #include "chrome/browser/ui/webui/predictors/predictors_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/predictors/autocomplete_action_predictor.h" 9 #include "chrome/browser/predictors/autocomplete_action_predictor.h"
10 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" 10 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h"
(...skipping 30 matching lines...) Expand all
41 base::DictionaryValue* entry = new base::DictionaryValue(); 41 base::DictionaryValue* entry = new base::DictionaryValue();
42 entry->SetString("user_text", it->first.user_text); 42 entry->SetString("user_text", it->first.user_text);
43 entry->SetString("url", it->first.url.spec()); 43 entry->SetString("url", it->first.url.spec());
44 entry->SetInteger("hit_count", it->second.number_of_hits); 44 entry->SetInteger("hit_count", it->second.number_of_hits);
45 entry->SetInteger("miss_count", it->second.number_of_misses); 45 entry->SetInteger("miss_count", it->second.number_of_misses);
46 entry->SetDouble("confidence", 46 entry->SetDouble("confidence",
47 autocomplete_action_predictor_->CalculateConfidenceForDbEntry(it)); 47 autocomplete_action_predictor_->CalculateConfidenceForDbEntry(it));
48 db->Append(entry); 48 db->Append(entry);
49 } 49 }
50 dict.Set("db", db); 50 dict.Set("db", db);
51 dict.SetDouble("hit_weight", AutocompleteActionPredictor::get_hit_weight());
52 } 51 }
53 52
54 web_ui()->CallJavascriptFunction("updateDatabaseTable", dict); 53 web_ui()->CallJavascriptFunction("updateDatabaseTable", dict);
55 } 54 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/predictors/predictors.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698