Extension syncing: Introduce a NeedsSync pref
[chromium-blink-merge.git] / extensions / browser / updater / null_extension_cache.cc
blob3f60d6083aef1d74bf0cbf9c571d3c8fa4290fb7
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "extensions/browser/updater/null_extension_cache.h"
7 #include "base/callback.h"
9 namespace extensions {
11 NullExtensionCache::NullExtensionCache() {
14 NullExtensionCache::~NullExtensionCache() {
17 void NullExtensionCache::Start(const base::Closure& callback) {
18 callback.Run();
21 void NullExtensionCache::Shutdown(const base::Closure& callback) {
22 callback.Run();
25 void NullExtensionCache::AllowCaching(const std::string& id) {
28 bool NullExtensionCache::GetExtension(const std::string& id,
29 const std::string& expected_hash,
30 base::FilePath* file_path,
31 std::string* version) {
32 return false;
35 void NullExtensionCache::PutExtension(const std::string& id,
36 const std::string& expected_hash,
37 const base::FilePath& file_path,
38 const std::string& version,
39 const PutExtensionCallback& callback) {
40 callback.Run(file_path, true);
43 } // namespace extensions