| 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 | 5 |
| 6 //------------------------------------------------------------------------------ | 6 //------------------------------------------------------------------------------ |
| 7 // Description of the life cycle of a instance of MetricsService. | 7 // Description of the life cycle of a instance of MetricsService. |
| 8 // | 8 // |
| 9 // OVERVIEW | 9 // OVERVIEW |
| 10 // | 10 // |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 #if defined(USE_SYSTEM_LIBBZ2) | 46 #if defined(USE_SYSTEM_LIBBZ2) |
| 47 #include <bzlib.h> | 47 #include <bzlib.h> |
| 48 #else | 48 #else |
| 49 #include "third_party/bzip2/bzlib.h" | 49 #include "third_party/bzip2/bzlib.h" |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 #include "base/file_version_info.h" | 52 #include "base/file_version_info.h" |
| 53 #include "base/string_util.h" | 53 #include "base/string_util.h" |
| 54 #include "base/thread.h" | 54 #include "base/thread.h" |
| 55 #include "base/string_number_conversions.h" |
| 55 #include "base/utf_string_conversions.h" | 56 #include "base/utf_string_conversions.h" |
| 56 #include "chrome/common/chrome_version_info.h" | 57 #include "chrome/common/chrome_version_info.h" |
| 57 #include "chrome/installer/util/browser_distribution.h" | 58 #include "chrome/installer/util/browser_distribution.h" |
| 58 #include "chrome/installer/util/chrome_frame_distribution.h" | 59 #include "chrome/installer/util/chrome_frame_distribution.h" |
| 59 #include "chrome/installer/util/google_update_settings.h" | 60 #include "chrome/installer/util/google_update_settings.h" |
| 60 #include "chrome_frame/bind_status_callback_impl.h" | 61 #include "chrome_frame/bind_status_callback_impl.h" |
| 61 #include "chrome_frame/crash_reporting/crash_metrics.h" | 62 #include "chrome_frame/crash_reporting/crash_metrics.h" |
| 62 #include "chrome_frame/utils.h" | 63 #include "chrome_frame/utils.h" |
| 63 #include "net/base/upload_data.h" | 64 #include "net/base/upload_data.h" |
| 64 #include "chrome_frame/urlmon_bind_status_callback.h" | 65 #include "chrome_frame/urlmon_bind_status_callback.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 << hr; | 164 << hr; |
| 164 } | 165 } |
| 165 } | 166 } |
| 166 return hr; | 167 return hr; |
| 167 } | 168 } |
| 168 | 169 |
| 169 STDMETHOD(BeginningTransaction)(LPCWSTR url, LPCWSTR headers, DWORD reserved, | 170 STDMETHOD(BeginningTransaction)(LPCWSTR url, LPCWSTR headers, DWORD reserved, |
| 170 LPWSTR* additional_headers) { | 171 LPWSTR* additional_headers) { |
| 171 std::string new_headers; | 172 std::string new_headers; |
| 172 new_headers = StringPrintf("Content-Length: %s\r\n", | 173 new_headers = StringPrintf("Content-Length: %s\r\n", |
| 173 Int64ToString(upload_data_size_).c_str()); | 174 base::Int64ToString(upload_data_size_).c_str()); |
| 174 new_headers += kMetricsType; | 175 new_headers += kMetricsType; |
| 175 | 176 |
| 176 *additional_headers = reinterpret_cast<wchar_t*>( | 177 *additional_headers = reinterpret_cast<wchar_t*>( |
| 177 CoTaskMemAlloc((new_headers.size() + 1) * sizeof(wchar_t))); | 178 CoTaskMemAlloc((new_headers.size() + 1) * sizeof(wchar_t))); |
| 178 | 179 |
| 179 lstrcpynW(*additional_headers, ASCIIToWide(new_headers).c_str(), | 180 lstrcpynW(*additional_headers, ASCIIToWide(new_headers).c_str(), |
| 180 new_headers.size()); | 181 new_headers.size()); |
| 181 return BSCBImpl::BeginningTransaction(url, headers, reserved, | 182 return BSCBImpl::BeginningTransaction(url, headers, reserved, |
| 182 additional_headers); | 183 additional_headers); |
| 183 } | 184 } |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 version += "-F"; | 471 version += "-F"; |
| 471 if (!version_info->is_official_build()) | 472 if (!version_info->is_official_build()) |
| 472 version.append("-devel"); | 473 version.append("-devel"); |
| 473 return version; | 474 return version; |
| 474 } else { | 475 } else { |
| 475 NOTREACHED() << "Unable to retrieve version string."; | 476 NOTREACHED() << "Unable to retrieve version string."; |
| 476 } | 477 } |
| 477 | 478 |
| 478 return std::string(); | 479 return std::string(); |
| 479 } | 480 } |
| OLD | NEW |