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

Side by Side Diff: chrome/common/metrics_helpers.cc

Issue 6903022: Removed wchar_t from Time::FromString (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unnecessary blankline. Created 9 years, 5 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/web_resource/promo_resource_service.cc ('k') | net/ftp/ftp_util_unittest.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) 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/common/metrics_helpers.h" 5 #include "chrome/common/metrics_helpers.h"
6 6
7 #if defined(USE_SYSTEM_LIBBZ2) 7 #if defined(USE_SYSTEM_LIBBZ2)
8 #include <bzlib.h> 8 #include <bzlib.h>
9 #else 9 #else
10 #include "third_party/bzip2/bzlib.h" 10 #include "third_party/bzip2/bzlib.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 int result = xmlTextWriterEndElement(xml_wrapper_->writer()); 365 int result = xmlTextWriterEndElement(xml_wrapper_->writer());
366 DCHECK_GE(result, 0); 366 DCHECK_GE(result, 0);
367 } 367 }
368 368
369 // static 369 // static
370 int64 MetricsLogBase::GetBuildTime() { 370 int64 MetricsLogBase::GetBuildTime() {
371 static int64 integral_build_time = 0; 371 static int64 integral_build_time = 0;
372 if (!integral_build_time) { 372 if (!integral_build_time) {
373 Time time; 373 Time time;
374 const char* kDateTime = __DATE__ " " __TIME__ " GMT"; 374 const char* kDateTime = __DATE__ " " __TIME__ " GMT";
375 bool result = Time::FromString(ASCIIToWide(kDateTime).c_str(), &time); 375 bool result = Time::FromString(kDateTime, &time);
376 DCHECK(result); 376 DCHECK(result);
377 integral_build_time = static_cast<int64>(time.ToTimeT()); 377 integral_build_time = static_cast<int64>(time.ToTimeT());
378 } 378 }
379 return integral_build_time; 379 return integral_build_time;
380 } 380 }
381 381
382 MetricsLog* MetricsLogBase::AsMetricsLog() { 382 MetricsLog* MetricsLogBase::AsMetricsLog() {
383 return NULL; 383 return NULL;
384 } 384 }
385 385
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 snapshot.Subtract(*already_logged); 585 snapshot.Subtract(*already_logged);
586 } 586 }
587 587
588 // Snapshot now contains only a delta to what we've already_logged. 588 // Snapshot now contains only a delta to what we've already_logged.
589 if (snapshot.redundant_count() > 0) { 589 if (snapshot.redundant_count() > 0) {
590 TransmitHistogramDelta(histogram, snapshot); 590 TransmitHistogramDelta(histogram, snapshot);
591 // Add new data into our running total. 591 // Add new data into our running total.
592 already_logged->Add(snapshot); 592 already_logged->Add(snapshot);
593 } 593 }
594 } 594 }
OLDNEW
« no previous file with comments | « chrome/browser/web_resource/promo_resource_service.cc ('k') | net/ftp/ftp_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698