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

Side by Side Diff: chrome_frame/urlmon_url_request.cc

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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
OLDNEW
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 #include "chrome_frame/urlmon_url_request.h" 5 #include "chrome_frame/urlmon_url_request.h"
6 6
7 #include <urlmon.h> 7 #include <urlmon.h>
8 #include <wininet.h> 8 #include <wininet.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 new_request = created_request; 1076 new_request = created_request;
1077 } 1077 }
1078 1078
1079 // Format upload data if it's chunked. 1079 // Format upload data if it's chunked.
1080 if (request_info.upload_data && request_info.upload_data->is_chunked()) { 1080 if (request_info.upload_data && request_info.upload_data->is_chunked()) {
1081 ScopedVector<net::UploadElement>* elements = 1081 ScopedVector<net::UploadElement>* elements =
1082 request_info.upload_data->elements_mutable(); 1082 request_info.upload_data->elements_mutable();
1083 for (size_t i = 0; i < elements->size(); ++i) { 1083 for (size_t i = 0; i < elements->size(); ++i) {
1084 net::UploadElement* element = (*elements)[i]; 1084 net::UploadElement* element = (*elements)[i];
1085 DCHECK(element->type() == net::UploadElement::TYPE_BYTES); 1085 DCHECK(element->type() == net::UploadElement::TYPE_BYTES);
1086 std::string chunk_length = StringPrintf( 1086 std::string chunk_length = base::StringPrintf(
1087 "%X\r\n", static_cast<unsigned int>(element->bytes_length())); 1087 "%X\r\n", static_cast<unsigned int>(element->bytes_length()));
1088 std::vector<char> bytes; 1088 std::vector<char> bytes;
1089 bytes.insert(bytes.end(), chunk_length.data(), 1089 bytes.insert(bytes.end(), chunk_length.data(),
1090 chunk_length.data() + chunk_length.length()); 1090 chunk_length.data() + chunk_length.length());
1091 const char* data = element->bytes(); 1091 const char* data = element->bytes();
1092 bytes.insert(bytes.end(), data, data + element->bytes_length()); 1092 bytes.insert(bytes.end(), data, data + element->bytes_length());
1093 const char* crlf = "\r\n"; 1093 const char* crlf = "\r\n";
1094 bytes.insert(bytes.end(), crlf, crlf + strlen(crlf)); 1094 bytes.insert(bytes.end(), crlf, crlf + strlen(crlf));
1095 if (i == elements->size() - 1) { 1095 if (i == elements->size() - 1) {
1096 const char* end_of_data = "0\r\n\r\n"; 1096 const char* end_of_data = "0\r\n\r\n";
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 privacy_info_.privacy_records[UTF8ToWide(url)]; 1439 privacy_info_.privacy_records[UTF8ToWide(url)];
1440 1440
1441 privacy_entry.flags |= flags; 1441 privacy_entry.flags |= flags;
1442 privacy_entry.policy_ref = UTF8ToWide(policy_ref); 1442 privacy_entry.policy_ref = UTF8ToWide(policy_ref);
1443 1443
1444 if (fire_privacy_event && IsWindow(notification_window_)) { 1444 if (fire_privacy_event && IsWindow(notification_window_)) {
1445 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, 1445 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1,
1446 0); 1446 0);
1447 } 1447 }
1448 } 1448 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698