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

Unified Diff: chrome/browser/feedback/feedback_util.cc

Issue 24998007: Modify ZipString to allow the filename to be passed as an argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/feedback/feedback_util.h ('k') | chrome/browser/feedback/tracing_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/feedback/feedback_util.cc
diff --git a/chrome/browser/feedback/feedback_util.cc b/chrome/browser/feedback/feedback_util.cc
index 4f272a5b7a58b85e6ed467d66dec9844c02d05cc..5df5fb3a5e1b6610f5553ac87585cc88cdad975d 100644
--- a/chrome/browser/feedback/feedback_util.cc
+++ b/chrome/browser/feedback/feedback_util.cc
@@ -57,9 +57,6 @@
namespace {
-const base::FilePath::CharType kLogsFilename[] =
- FILE_PATH_LITERAL("system_logs.txt");
-
void DispatchFeedback(Profile* profile, std::string* post_body, int64 delay);
GURL GetTargetTabUrl(int session_id, int index) {
@@ -365,7 +362,8 @@ void SendReport(scoped_refptr<FeedbackData> data) {
DispatchFeedback(data->profile(), post_body, 0);
}
-bool ZipString(const std::string& logs, std::string* compressed_logs) {
+bool ZipString(const base::FilePath::CharType filename[],
+ const std::string& logs, std::string* compressed_logs) {
base::FilePath temp_path;
base::FilePath zip_file;
@@ -373,7 +371,7 @@ bool ZipString(const std::string& logs, std::string* compressed_logs) {
// another temporary file to receive the zip file in.
if (!file_util::CreateNewTempDirectory(FILE_PATH_LITERAL(""), &temp_path))
return false;
- if (file_util::WriteFile(temp_path.Append(kLogsFilename),
+ if (file_util::WriteFile(temp_path.Append(filename),
logs.c_str(), logs.size()) == -1)
return false;
if (!file_util::CreateTemporaryFile(&zip_file))
« no previous file with comments | « chrome/browser/feedback/feedback_util.h ('k') | chrome/browser/feedback/tracing_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698