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

Side by Side Diff: chrome/test/chromedriver/util.cc

Issue 1485023003: Misc truncation fixes for gn builds with VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes to four more components/content files Created 5 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/test/chromedriver/util.h" 5 #include "chrome/test/chromedriver/util.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 DataOutputStream stream; 297 DataOutputStream stream;
298 stream.WriteUInt32(kFileHeaderSignature); 298 stream.WriteUInt32(kFileHeaderSignature);
299 stream.WriteUInt16(version_needed); 299 stream.WriteUInt16(version_needed);
300 stream.WriteUInt16(bit_flag); 300 stream.WriteUInt16(bit_flag);
301 stream.WriteUInt16(compression_method); 301 stream.WriteUInt16(compression_method);
302 stream.WriteUInt16(mod_time); 302 stream.WriteUInt16(mod_time);
303 stream.WriteUInt16(mod_date); 303 stream.WriteUInt16(mod_date);
304 stream.WriteUInt32(crc); 304 stream.WriteUInt32(crc);
305 stream.WriteUInt32(compressed_data.length()); 305 stream.WriteUInt32(compressed_data.length());
306 stream.WriteUInt32(uncompressed_size); 306 stream.WriteUInt32(uncompressed_size);
307 stream.WriteUInt16(name.length()); 307 stream.WriteUInt16(base::checked_cast<uint16>(name.length()));
308 stream.WriteUInt16(fields.length()); 308 stream.WriteUInt16(base::checked_cast<uint16>(fields.length()));
309 stream.WriteString(name); 309 stream.WriteString(name);
310 stream.WriteString(fields); 310 stream.WriteString(fields);
311 stream.WriteString(compressed_data); 311 stream.WriteString(compressed_data);
312 uint32 entry_size = stream.buffer().length(); 312 uint32 entry_size = stream.buffer().length();
313 313
314 // Write central directory. 314 // Write central directory.
315 stream.WriteUInt32(kCentralDirSignature); 315 stream.WriteUInt32(kCentralDirSignature);
316 stream.WriteUInt16(0x14); // Version made by. Unused at version 0. 316 stream.WriteUInt16(0x14); // Version made by. Unused at version 0.
317 stream.WriteUInt16(version_needed); 317 stream.WriteUInt16(version_needed);
318 stream.WriteUInt16(bit_flag); 318 stream.WriteUInt16(bit_flag);
319 stream.WriteUInt16(compression_method); 319 stream.WriteUInt16(compression_method);
320 stream.WriteUInt16(mod_time); 320 stream.WriteUInt16(mod_time);
321 stream.WriteUInt16(mod_date); 321 stream.WriteUInt16(mod_date);
322 stream.WriteUInt32(crc); 322 stream.WriteUInt32(crc);
323 stream.WriteUInt32(compressed_data.length()); 323 stream.WriteUInt32(compressed_data.length());
324 stream.WriteUInt32(uncompressed_size); 324 stream.WriteUInt32(uncompressed_size);
325 stream.WriteUInt16(name.length()); 325 stream.WriteUInt16(base::checked_cast<uint16>(name.length()));
326 stream.WriteUInt16(fields.length()); 326 stream.WriteUInt16(base::checked_cast<uint16>(fields.length()));
327 stream.WriteUInt16(0); // Comment length. 327 stream.WriteUInt16(0); // Comment length.
328 stream.WriteUInt16(0); // Disk number where file starts. 328 stream.WriteUInt16(0); // Disk number where file starts.
329 stream.WriteUInt16(0); // Internal file attr. 329 stream.WriteUInt16(0); // Internal file attr.
330 stream.WriteUInt32(0); // External file attr. 330 stream.WriteUInt32(0); // External file attr.
331 stream.WriteUInt32(0); // Offset to file. 331 stream.WriteUInt32(0); // Offset to file.
332 stream.WriteString(name); 332 stream.WriteString(name);
333 stream.WriteString(fields); 333 stream.WriteString(fields);
334 uint32 cd_size = stream.buffer().length() - entry_size; 334 uint32 cd_size = stream.buffer().length() - entry_size;
335 335
336 // End of central directory. 336 // End of central directory.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 if (session->chrome) { 432 if (session->chrome) {
433 const BrowserInfo* browser_info = session->chrome->GetBrowserInfo(); 433 const BrowserInfo* browser_info = session->chrome->GetBrowserInfo();
434 status.AddDetails("Session info: " + browser_info->browser_name + "=" + 434 status.AddDetails("Session info: " + browser_info->browser_name + "=" +
435 browser_info->browser_version); 435 browser_info->browser_version);
436 } 436 }
437 return status; 437 return status;
438 } 438 }
439 } 439 }
440 return Status(kOk); 440 return Status(kOk);
441 } 441 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/key_converter_unittest.cc ('k') | components/gcm_driver/crypto/gcm_message_cryptographer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698