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

Side by Side Diff: components/feedback/feedback_report.cc

Issue 225183018: Move feedback files into src/components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to latest Created 6 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_report.h" 5 #include "components/feedback/feedback_report.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file.h"
8 #include "base/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
9 #include "base/files/important_file_writer.h" 10 #include "base/files/important_file_writer.h"
10 #include "base/guid.h" 11 #include "base/guid.h"
12 #include "base/sequenced_task_runner.h"
11 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
12 #include "base/threading/sequenced_worker_pool.h" 14 #include "base/threading/sequenced_worker_pool.h"
13 #include "net/base/directory_lister.h"
14 15
15 namespace { 16 namespace {
16 17
17 const base::FilePath::CharType kFeedbackReportFilenameWildcard[] = 18 const base::FilePath::CharType kFeedbackReportFilenameWildcard[] =
18 FILE_PATH_LITERAL("Feedback Report.*"); 19 FILE_PATH_LITERAL("Feedback Report.*");
19 20
20 const char kFeedbackReportFilenamePrefix[] = "Feedback Report."; 21 const char kFeedbackReportFilenamePrefix[] = "Feedback Report.";
21 22
22 void WriteReportOnBlockingPool(const base::FilePath reports_path, 23 void WriteReportOnBlockingPool(const base::FilePath reports_path,
23 const base::FilePath& file, 24 const base::FilePath& file,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 !name.empty(); 75 !name.empty();
75 name = enumerator.Next()) { 76 name = enumerator.Next()) {
76 std::string data; 77 std::string data;
77 if (ReadFileToString(name, &data)) 78 if (ReadFileToString(name, &data))
78 callback.Run(data); 79 callback.Run(data);
79 base::DeleteFile(name, false); 80 base::DeleteFile(name, false);
80 } 81 }
81 } 82 }
82 83
83 } // namespace feedback 84 } // namespace feedback
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698