diff options
Diffstat (limited to 'chrome/browser/fragmentation_checker_win.h')
-rw-r--r-- | chrome/browser/fragmentation_checker_win.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/chrome/browser/fragmentation_checker_win.h b/chrome/browser/fragmentation_checker_win.h new file mode 100644 index 0000000..02f4231 --- /dev/null +++ b/chrome/browser/fragmentation_checker_win.h @@ -0,0 +1,28 @@ +// Copyright (c) 2011 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_FRAGMENTATION_CHECKER_WIN_H_ +#define CHROME_BROWSER_FRAGMENTATION_CHECKER_WIN_H_ +#pragma once + +class FilePath; + +namespace fragmentation_checker { + +const int kMaxExtentCount = 1 << 16; + +// Returns the number of extents for the file at |file_path|. The number is +// capped at kMaxExtentCount, files with more extents than that will be counted +// as having kMaxExtentCount extents. On failure, this function returns 0. +int CountFileExtents(const FilePath& file_path); + +// Records fragmentation metrics for the current module. This records the number +// of fragments the current module is stored in. +// This will be used to determine whether pursuing more aggressive +// manual defragmentation is worth the effort. +void RecordFragmentationMetricForCurrentModule(); + +} // namespace fragmentation_checker + +#endif // CHROME_BROWSER_FRAGMENTATION_CHECKER_WIN_H_ |