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

Side by Side Diff: base/metrics/persistent_histogram_allocator.h

Issue 2715543005: Clean up: Remove GlobalHistogramAllocator::CreateWithSharedMemory (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | base/metrics/persistent_histogram_allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef BASE_METRICS_HISTOGRAM_PERSISTENCE_H_ 5 #ifndef BASE_METRICS_HISTOGRAM_PERSISTENCE_H_
6 #define BASE_METRICS_HISTOGRAM_PERSISTENCE_H_ 6 #define BASE_METRICS_HISTOGRAM_PERSISTENCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // Constructs a pair of names in |dir| based on name that can be used for a 424 // Constructs a pair of names in |dir| based on name that can be used for a
425 // base + active persistent memory mapped location for CreateWithActiveFile(). 425 // base + active persistent memory mapped location for CreateWithActiveFile().
426 // |name| will be used as the basename of the file inside |dir|. 426 // |name| will be used as the basename of the file inside |dir|.
427 // |out_base_path| or |out_active_path| may be null if not needed. 427 // |out_base_path| or |out_active_path| may be null if not needed.
428 static void ConstructFilePaths(const FilePath& dir, 428 static void ConstructFilePaths(const FilePath& dir,
429 StringPiece name, 429 StringPiece name,
430 FilePath* out_base_path, 430 FilePath* out_base_path,
431 FilePath* out_active_path); 431 FilePath* out_active_path);
432 #endif 432 #endif
433 433
434 // Create a global allocator using a block of shared |memory| of the
435 // specified |size|. The allocator takes ownership of the shared memory
436 // and releases it upon destruction, though the memory will continue to
437 // live if other processes have access to it.
438 static void CreateWithSharedMemory(std::unique_ptr<SharedMemory> memory,
439 size_t size,
440 uint64_t id,
441 StringPiece name);
442
443 // Create a global allocator using a block of shared memory accessed 434 // Create a global allocator using a block of shared memory accessed
444 // through the given |handle| and |size|. The allocator takes ownership 435 // through the given |handle| and |size|. The allocator takes ownership
445 // of the handle and closes it upon destruction, though the memory will 436 // of the handle and closes it upon destruction, though the memory will
446 // continue to live if other processes have access to it. 437 // continue to live if other processes have access to it.
447 static void CreateWithSharedMemoryHandle(const SharedMemoryHandle& handle, 438 static void CreateWithSharedMemoryHandle(const SharedMemoryHandle& handle,
448 size_t size); 439 size_t size);
449 440
450 // Sets a GlobalHistogramAllocator for globally storing histograms in 441 // Sets a GlobalHistogramAllocator for globally storing histograms in
451 // a space that can be persisted or shared between processes. There is only 442 // a space that can be persisted or shared between processes. There is only
452 // ever one allocator for all such histograms created by a single process. 443 // ever one allocator for all such histograms created by a single process.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 495
505 // The location to which the data should be persisted. 496 // The location to which the data should be persisted.
506 FilePath persistent_location_; 497 FilePath persistent_location_;
507 498
508 DISALLOW_COPY_AND_ASSIGN(GlobalHistogramAllocator); 499 DISALLOW_COPY_AND_ASSIGN(GlobalHistogramAllocator);
509 }; 500 };
510 501
511 } // namespace base 502 } // namespace base
512 503
513 #endif // BASE_METRICS_HISTOGRAM_PERSISTENCE_H_ 504 #endif // BASE_METRICS_HISTOGRAM_PERSISTENCE_H_
OLDNEW
« 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