summaryrefslogtreecommitdiffstats
path: root/extensions/browser/updater/null_extension_cache.cc
blob: 3f60d6083aef1d74bf0cbf9c571d3c8fa4290fb7 (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
41
42
43
// Copyright 2014 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.

#include "extensions/browser/updater/null_extension_cache.h"

#include "base/callback.h"

namespace extensions {

NullExtensionCache::NullExtensionCache() {
}

NullExtensionCache::~NullExtensionCache() {
}

void NullExtensionCache::Start(const base::Closure& callback) {
  callback.Run();
}

void NullExtensionCache::Shutdown(const base::Closure& callback) {
  callback.Run();
}

void NullExtensionCache::AllowCaching(const std::string& id) {
}

bool NullExtensionCache::GetExtension(const std::string& id,
                                      const std::string& expected_hash,
                                      base::FilePath* file_path,
                                      std::string* version) {
  return false;
}

void NullExtensionCache::PutExtension(const std::string& id,
                                      const std::string& expected_hash,
                                      const base::FilePath& file_path,
                                      const std::string& version,
                                      const PutExtensionCallback& callback) {
  callback.Run(file_path, true);
}

}  // namespace extensions