summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorpph34r@gmail.com <pph34r@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-16 07:29:17 +0000
committerpph34r@gmail.com <pph34r@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-16 07:29:17 +0000
commitb404b1f2399b7183f7ec54d42c7797ee54ffcd13 (patch)
treebcdc208cb4371b7f51cf000d5e7884e235e3703a /chrome
parenta73a6a4f6da13af6331d13c1f8ac624722072e0d (diff)
downloadchromium_src-b404b1f2399b7183f7ec54d42c7797ee54ffcd13.zip
chromium_src-b404b1f2399b7183f7ec54d42c7797ee54ffcd13.tar.gz
chromium_src-b404b1f2399b7183f7ec54d42c7797ee54ffcd13.tar.bz2
Fix of unused variable warnings related to DHISTOGRAM* in release builds.
Make DHISTOGRAM* keep a mention of passed variables. Add Histogram::DebugNow() for use in DHISTOGRAM* as a start_time. BUG=87490 TEST=None Review URL: http://codereview.chromium.org/8225001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/spellchecker/spellchecker_mac.mm6
-rw-r--r--chrome/renderer/spellchecker/spellcheck.cc4
2 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/spellchecker/spellchecker_mac.mm b/chrome/browser/spellchecker/spellchecker_mac.mm
index fa9c049..a9dcc73 100644
--- a/chrome/browser/spellchecker/spellchecker_mac.mm
+++ b/chrome/browser/spellchecker/spellchecker_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -245,12 +245,12 @@ bool CheckSpelling(const string16& word_to_check, int tag) {
void FillSuggestionList(const string16& wrong_word,
std::vector<string16>* optional_suggestions) {
NSString* NS_wrong_word = base::SysUTF16ToNSString(wrong_word);
- TimeTicks begin_time = TimeTicks::Now();
+ TimeTicks debug_begin_time = base::Histogram::DebugNow();
// The suggested words for |wrong_word|.
NSArray* guesses =
[[NSSpellChecker sharedSpellChecker] guessesForWord:NS_wrong_word];
DHISTOGRAM_TIMES("Spellcheck.SuggestTime",
- TimeTicks::Now() - begin_time);
+ base::Histogram::DebugNow() - debug_begin_time);
for (int i = 0; i < static_cast<int>([guesses count]); i++) {
if (i < SpellCheckCommon::kMaxSuggestions) {
diff --git a/chrome/renderer/spellchecker/spellcheck.cc b/chrome/renderer/spellchecker/spellcheck.cc
index fb87366..952c2a7 100644
--- a/chrome/renderer/spellchecker/spellcheck.cc
+++ b/chrome/renderer/spellchecker/spellcheck.cc
@@ -195,7 +195,7 @@ void SpellCheck::InitializeHunspell() {
bdict_file_.reset(new file_util::MemoryMappedFile);
if (bdict_file_->Initialize(file_)) {
- TimeTicks start_time = TimeTicks::Now();
+ TimeTicks debug_start_time = base::Histogram::DebugNow();
hunspell_.reset(
new Hunspell(bdict_file_->data(), bdict_file_->length()));
@@ -207,7 +207,7 @@ void SpellCheck::InitializeHunspell() {
}
DHISTOGRAM_TIMES("Spellcheck.InitTime",
- TimeTicks::Now() - start_time);
+ base::Histogram::DebugNow() - debug_start_time);
} else {
NOTREACHED() << "Could not mmap spellchecker dictionary.";
}