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

Side by Side Diff: import/cross/raw_data.cc

Issue 159168: This fixes a number of things that are warnings in the Mac compiler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 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 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 if (!file_util::GetTempDir(&temp_path)) { 389 if (!file_util::GetTempDir(&temp_path)) {
390 return false; 390 return false;
391 } 391 }
392 392
393 String uuid_string = GetUUIDString(); 393 String uuid_string = GetUUIDString();
394 394
395 // format the temp file basename 395 // format the temp file basename
396 String filename; 396 String filename;
397 397
398 // try to retain the original file suffix (.jpg, etc.) 398 // try to retain the original file suffix (.jpg, etc.)
399 int dot_position = uri.rfind('.'); 399 std::string::size_type dot_position = uri.rfind('.');
400 if (dot_position != std::string::npos) { 400 if (dot_position != std::string::npos) {
401 filename = uuid_string + uri.substr(dot_position); 401 filename = uuid_string + uri.substr(dot_position);
402 } else { 402 } else {
403 filename = uuid_string; 403 filename = uuid_string;
404 } 404 }
405 405
406 // Construct the full pathname 406 // Construct the full pathname
407 FilePath fullpath = temp_path; 407 FilePath fullpath = temp_path;
408 fullpath = fullpath.AppendASCII(filename); 408 fullpath = fullpath.AppendASCII(filename);
409 409
410 if (temp_fullpath) *temp_fullpath = fullpath; 410 if (temp_fullpath) *temp_fullpath = fullpath;
411 411
412 return true; 412 return true;
413 } 413 }
414 414
415 } // namespace o3d 415 } // namespace o3d
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698