| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Description of the life cycle of a instance of MetricsService. | 6 // Description of the life cycle of a instance of MetricsService. |
| 7 // | 7 // |
| 8 // OVERVIEW | 8 // OVERVIEW |
| 9 // | 9 // |
| 10 // A MetricsService instance is created at ChromeFrame startup in | 10 // A MetricsService instance is created at ChromeFrame startup in |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 << hr; | 173 << hr; |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 return hr; | 176 return hr; |
| 177 } | 177 } |
| 178 | 178 |
| 179 STDMETHOD(BeginningTransaction)(LPCWSTR url, LPCWSTR headers, DWORD reserved, | 179 STDMETHOD(BeginningTransaction)(LPCWSTR url, LPCWSTR headers, DWORD reserved, |
| 180 LPWSTR* additional_headers) { | 180 LPWSTR* additional_headers) { |
| 181 std::string new_headers; | 181 std::string new_headers; |
| 182 new_headers = | 182 new_headers = |
| 183 StringPrintf("Content-Length: %s\r\n" | 183 base::StringPrintf( |
| 184 "Content-Type: %s\r\n" | 184 "Content-Length: %s\r\n" |
| 185 "%s\r\n", | 185 "Content-Type: %s\r\n" |
| 186 base::Int64ToString(upload_data_size_).c_str(), | 186 "%s\r\n", |
| 187 mime_type_.c_str(), | 187 base::Int64ToString(upload_data_size_).c_str(), |
| 188 http_utils::GetDefaultUserAgentHeaderWithCFTag().c_str()); | 188 mime_type_.c_str(), |
| 189 http_utils::GetDefaultUserAgentHeaderWithCFTag().c_str()); |
| 189 | 190 |
| 190 *additional_headers = reinterpret_cast<wchar_t*>( | 191 *additional_headers = reinterpret_cast<wchar_t*>( |
| 191 CoTaskMemAlloc((new_headers.size() + 1) * sizeof(wchar_t))); | 192 CoTaskMemAlloc((new_headers.size() + 1) * sizeof(wchar_t))); |
| 192 | 193 |
| 193 lstrcpynW(*additional_headers, ASCIIToWide(new_headers).c_str(), | 194 lstrcpynW(*additional_headers, ASCIIToWide(new_headers).c_str(), |
| 194 new_headers.size()); | 195 new_headers.size()); |
| 195 | 196 |
| 196 return BSCBImpl::BeginningTransaction(url, headers, reserved, | 197 return BSCBImpl::BeginningTransaction(url, headers, reserved, |
| 197 additional_headers); | 198 additional_headers); |
| 198 } | 199 } |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 version += "-F"; | 463 version += "-F"; |
| 463 if (!version_info.IsOfficialBuild()) | 464 if (!version_info.IsOfficialBuild()) |
| 464 version.append("-devel"); | 465 version.append("-devel"); |
| 465 return version; | 466 return version; |
| 466 } else { | 467 } else { |
| 467 NOTREACHED() << "Unable to retrieve version string."; | 468 NOTREACHED() << "Unable to retrieve version string."; |
| 468 } | 469 } |
| 469 | 470 |
| 470 return std::string(); | 471 return std::string(); |
| 471 } | 472 } |
| OLD | NEW |