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

Unified Diff: chrome/browser/feedback/feedback_report.h

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/feedback/feedback_report.h
diff --git a/chrome/browser/feedback/feedback_report.h b/chrome/browser/feedback/feedback_report.h
deleted file mode 100644
index 92914d137f5d09f5ff5bd544992d950d8f57ab4c..0000000000000000000000000000000000000000
--- a/chrome/browser/feedback/feedback_report.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_
-#define CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/callback_forward.h"
-#include "base/files/file_path.h"
-#include "base/memory/ref_counted.h"
-#include "base/time/time.h"
-
-namespace base {
-class SequencedTaskRunner;
-}
-
-namespace feedback {
-
-typedef base::Callback<void(const std::string&)> QueueCallback;
-
-// This class holds a feedback report. Once a report is created, a disk backup
-// for it is created automatically. This backup needs to explicitly be
-// deleted by calling DeleteReportOnDisk.
-class FeedbackReport : public base::RefCounted<FeedbackReport> {
- public:
- FeedbackReport(const base::FilePath& path,
- const base::Time& upload_at,
- const std::string& data,
- scoped_refptr<base::SequencedTaskRunner> task_runner);
-
- // Stops the disk write of the report and deletes the report file if already
- // written.
- void DeleteReportOnDisk();
-
- const base::Time& upload_at() const { return upload_at_; }
- const std::string& data() const { return data_; }
-
- // Loads the reports still on disk and queues then using the given callback.
- // This call blocks on the file reads.
- static void LoadReportsAndQueue(const base::FilePath& user_dir,
- QueueCallback callback);
-
- private:
- friend class base::RefCounted<FeedbackReport>;
- virtual ~FeedbackReport();
-
- // Name of the file corresponding to this report.
- base::FilePath file_;
-
- base::FilePath reports_path_;
- base::Time upload_at_; // Upload this report at or after this time.
- std::string data_;
-
- scoped_refptr<base::SequencedTaskRunner> reports_task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(FeedbackReport);
-};
-
-} // namespace feedback
-
-#endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_

Powered by Google App Engine
This is Rietveld 408576698