OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" |
11 #endif | 11 #endif |
12 | 12 |
13 #include "base/base64.h" | 13 #include "base/base64.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/file_util.h" | 16 #include "base/file_util.h" |
17 #include "base/md5.h" | 17 #include "base/md5.h" |
18 #include "base/perftimer.h" | 18 #include "base/perftimer.h" |
19 #include "base/scoped_ptr.h" | 19 #include "base/scoped_ptr.h" |
20 #include "base/string_number_conversions.h" | 20 #include "base/string_number_conversions.h" |
21 #include "base/string_util.h" // TODO(brettw) remove when ASCIIToUTF16 moves. | |
22 #include "base/sys_info.h" | 21 #include "base/sys_info.h" |
23 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
24 #include "base/third_party/nspr/prtime.h" | 23 #include "base/third_party/nspr/prtime.h" |
25 #include "chrome/common/logging_chrome.h" | 24 #include "chrome/common/logging_chrome.h" |
26 #include "googleurl/src/gurl.h" | 25 #include "googleurl/src/gurl.h" |
27 #include "libxml/xmlwriter.h" | 26 #include "libxml/xmlwriter.h" |
28 | 27 |
29 #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) | 28 #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) |
30 | 29 |
31 using base::Time; | 30 using base::Time; |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 } | 507 } |
509 } | 508 } |
510 | 509 |
511 void MetricsServiceBase::DiscardPendingLog() { | 510 void MetricsServiceBase::DiscardPendingLog() { |
512 if (pending_log_) { // Shutdown might have deleted it! | 511 if (pending_log_) { // Shutdown might have deleted it! |
513 delete pending_log_; | 512 delete pending_log_; |
514 pending_log_ = NULL; | 513 pending_log_ = NULL; |
515 } | 514 } |
516 compressed_log_.clear(); | 515 compressed_log_.clear(); |
517 } | 516 } |
OLD | NEW |