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

Unified Diff: base/metrics/persistent_histogram_allocator.h

Issue 2938263002: Put BrowserMetrics with embedded profiles into subdir for auto-upload. (Closed)
Patch Set: use std::string::append() where possible Created 3 years, 6 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 | « no previous file | base/metrics/persistent_histogram_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_histogram_allocator.h
diff --git a/base/metrics/persistent_histogram_allocator.h b/base/metrics/persistent_histogram_allocator.h
index 8a8d4cb32a9b829e5cc339f09991a9008f70dd1a..a6e2ff5d431737c6c9fe176a7c054f74623baf3d 100644
--- a/base/metrics/persistent_histogram_allocator.h
+++ b/base/metrics/persistent_histogram_allocator.h
@@ -435,6 +435,16 @@ class BASE_EXPORT GlobalHistogramAllocator
FilePath* out_active_path,
FilePath* out_spare_path);
+ // As above but puts the base files in a different "upload" directory. This
+ // is useful when moving all completed files into a single directory for easy
+ // upload management.
+ static void ConstructFilePathsForUploadDir(const FilePath& active_dir,
+ const FilePath& upload_dir,
+ const std::string& name,
+ FilePath* out_upload_path,
+ FilePath* out_active_path,
+ FilePath* out_spare_path);
+
// Create a "spare" file that can later be made the "active" file. This
// should be done on a background thread if possible.
static bool CreateSpareFile(const FilePath& spare_path, size_t size);
@@ -504,6 +514,9 @@ class BASE_EXPORT GlobalHistogramAllocator
// nothing new has been added.
void ImportHistogramsToStatisticsRecorder();
+ // Builds a FilePath for a metrics file.
+ static FilePath MakeMetricsFilePath(const FilePath& dir, StringPiece name);
+
// Import always continues from where it left off, making use of a single
// iterator to continue the work.
Iterator import_iterator_;
« no previous file with comments | « no previous file | base/metrics/persistent_histogram_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698