summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/updater/extension_cache_delegate.h
blob: a8b5110d7f731a71fb6f689af9e009b8b9db431a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2015 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_EXTENSIONS_UPDATER_EXTENSION_CACHE_DELEGATE_H_
#define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_DELEGATE_H_

#include <stddef.h>

#include "base/macros.h"
#include "base/time/time.h"

namespace base {

class FilePath;

}  // namespace base

namespace extensions {

// This class is used to pass ExtensionCacheImpl's initialization parameters.
// Every function of this class is called only once during ExtensionCacheImpl
// construction.
class ExtensionCacheDelegate {
 public:
  virtual ~ExtensionCacheDelegate();

  virtual const base::FilePath& GetCacheDir() const = 0;

  virtual size_t GetMinimumCacheSize() const;
  virtual size_t GetMaximumCacheSize() const;
  virtual base::TimeDelta GetMaximumCacheAge() const;

 private:
  DISALLOW_ASSIGN(ExtensionCacheDelegate);
};

}  // namespace extensions

#endif  // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_DELEGATE_H_