| 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 #include "chrome/browser/feedback/feedback_util.h" | 5 #include "chrome/browser/feedback/feedback_util.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 return false; | 408 return false; |
| 409 if (file_util::WriteFile(temp_path.Append(kLogsFilename), | 409 if (file_util::WriteFile(temp_path.Append(kLogsFilename), |
| 410 logs.c_str(), logs.size()) == -1) | 410 logs.c_str(), logs.size()) == -1) |
| 411 return false; | 411 return false; |
| 412 if (!file_util::CreateTemporaryFile(&zip_file)) | 412 if (!file_util::CreateTemporaryFile(&zip_file)) |
| 413 return false; | 413 return false; |
| 414 | 414 |
| 415 if (!zip::Zip(temp_path, zip_file, false)) | 415 if (!zip::Zip(temp_path, zip_file, false)) |
| 416 return false; | 416 return false; |
| 417 | 417 |
| 418 if (!file_util::ReadFileToString(zip_file, compressed_logs)) | 418 if (!base::ReadFileToString(zip_file, compressed_logs)) |
| 419 return false; | 419 return false; |
| 420 | 420 |
| 421 return true; | 421 return true; |
| 422 } | 422 } |
| 423 | 423 |
| 424 } // namespace feedback_util | 424 } // namespace feedback_util |
| OLD | NEW |