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

Unified Diff: base/metrics/persistent_histogram_allocator.h

Issue 2938263002: Put BrowserMetrics with embedded profiles into subdir for auto-upload. (Closed)
Patch Set: rebased 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
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..a6006c9361ad7ddc22691d4053750fa54b53f3cc 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,
Alexei Svitkine (slow) 2017/06/28 17:30:35 StringPiece especially since you pass in kBrowserM
bcwhite 2017/06/28 18:52:08 std::string takes a char* no problem. Inside, tho
Alexei Svitkine (slow) 2017/06/28 19:19:09 Ah right, because you're converting via .as_string
+ 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);
« no previous file with comments | « no previous file | base/metrics/persistent_histogram_allocator.cc » ('j') | base/metrics/persistent_histogram_allocator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698