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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_host_metrics.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/spellchecker/spellcheck_host_metrics.h" 5 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h"
6 6
7 #include "base/md5.h" 7 #include "base/md5.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 9
10 SpellCheckHostMetrics::SpellCheckHostMetrics() 10 SpellCheckHostMetrics::SpellCheckHostMetrics()
11 : misspelled_word_count_(0), 11 : misspelled_word_count_(0),
12 spellchecked_word_count_(0), 12 spellchecked_word_count_(0),
13 suggestion_show_count_(0), 13 suggestion_show_count_(0),
14 replaced_word_count_(0), 14 replaced_word_count_(0),
15 start_time_(base::Time::Now()) { 15 start_time_(base::Time::Now()) {
16 const uint64 kHistogramTimerDurationInMinutes = 30; 16 const uint64 kHistogramTimerDurationInMinutes = 30;
17 recording_timer_.Start(FROM_HERE, 17 recording_timer_.Start(
18 base::TimeDelta::FromMinutes(kHistogramTimerDurationInMinutes), 18 base::TimeDelta::FromMinutes(kHistogramTimerDurationInMinutes),
19 this, &SpellCheckHostMetrics::OnHistogramTimerExpired); 19 this, &SpellCheckHostMetrics::OnHistogramTimerExpired);
20 RecordWordCounts(); 20 RecordWordCounts();
21 } 21 }
22 22
23 SpellCheckHostMetrics::~SpellCheckHostMetrics() { 23 SpellCheckHostMetrics::~SpellCheckHostMetrics() {
24 } 24 }
25 25
26 void SpellCheckHostMetrics::RecordCustomWordCountStats(size_t count) { 26 void SpellCheckHostMetrics::RecordCustomWordCountStats(size_t count) {
27 UMA_HISTOGRAM_COUNTS("SpellCheck.CustomWords", count); 27 UMA_HISTOGRAM_COUNTS("SpellCheck.CustomWords", count);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 RecordWordCounts(); 101 RecordWordCounts();
102 } 102 }
103 103
104 void SpellCheckHostMetrics::RecordWordCounts() { 104 void SpellCheckHostMetrics::RecordWordCounts() {
105 UMA_HISTOGRAM_COUNTS("SpellCheck.CheckedWords", spellchecked_word_count_); 105 UMA_HISTOGRAM_COUNTS("SpellCheck.CheckedWords", spellchecked_word_count_);
106 UMA_HISTOGRAM_COUNTS("SpellCheck.MisspelledWords", misspelled_word_count_); 106 UMA_HISTOGRAM_COUNTS("SpellCheck.MisspelledWords", misspelled_word_count_);
107 UMA_HISTOGRAM_COUNTS("SpellCheck.ReplacedWords", replaced_word_count_); 107 UMA_HISTOGRAM_COUNTS("SpellCheck.ReplacedWords", replaced_word_count_);
108 UMA_HISTOGRAM_COUNTS("SpellCheck.UniqueWords", checked_word_hashes_.size()); 108 UMA_HISTOGRAM_COUNTS("SpellCheck.UniqueWords", checked_word_hashes_.size());
109 UMA_HISTOGRAM_COUNTS("SpellCheck.ShownSuggestions", suggestion_show_count_); 109 UMA_HISTOGRAM_COUNTS("SpellCheck.ShownSuggestions", suggestion_show_count_);
110 } 110 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | chrome/browser/sync/engine/sync_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698