OLD | NEW |
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 "components/feedback/feedback_data.h" | 5 #include "components/feedback/feedback_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "components/feedback/feedback_util.h" | 14 #include "components/feedback/feedback_util.h" |
15 #include "components/feedback/tracing_manager.h" | 15 #include "components/feedback/tracing_manager.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 | 17 |
18 using content::BrowserThread; | 18 using content::BrowserThread; |
19 | 19 |
20 namespace feedback { | 20 namespace feedback { |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char kTraceFilename[] = "tracing.zip\n"; | 23 const char kTraceFilename[] = "tracing.zip"; |
24 const char kPerformanceCategoryTag[] = "Performance"; | 24 const char kPerformanceCategoryTag[] = "Performance"; |
25 | 25 |
26 const base::FilePath::CharType kHistogramsFilename[] = | 26 const base::FilePath::CharType kHistogramsFilename[] = |
27 FILE_PATH_LITERAL("histograms.txt"); | 27 FILE_PATH_LITERAL("histograms.txt"); |
28 | 28 |
29 const char kHistogramsAttachmentName[] = "histograms.zip"; | 29 const char kHistogramsAttachmentName[] = "histograms.zip"; |
30 | 30 |
31 } // namespace | 31 } // namespace |
32 | 32 |
33 FeedbackData::FeedbackData() | 33 FeedbackData::FeedbackData() |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 void FeedbackData::SendReport() { | 136 void FeedbackData::SendReport() { |
137 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 137 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
138 if (IsDataComplete() && !report_sent_) { | 138 if (IsDataComplete() && !report_sent_) { |
139 report_sent_ = true; | 139 report_sent_ = true; |
140 send_report_.Run(this); | 140 send_report_.Run(this); |
141 } | 141 } |
142 } | 142 } |
143 | 143 |
144 } // namespace feedback | 144 } // namespace feedback |
OLD | NEW |