Make default apps cache multiprofile friendly
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / external_pref_cache_loader.h
blob16a08ff050ff0208087f370cb778cb81ba4fd7a7
1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_
8 #include "chrome/browser/extensions/external_pref_loader.h"
10 namespace chromeos {
12 // A specialization of the ExternalPrefCacheLoader that caches crx files for
13 // external extensions with update URL in common place for all users on the
14 // machine.
15 class ExternalPrefCacheLoader : public extensions::ExternalPrefLoader {
16 public:
17 // All instances of ExternalPrefCacheLoader use the same cache so
18 // |base_path_id| must be the same for all profile in session.
19 // It is checked in run-time with CHECK.
20 explicit ExternalPrefCacheLoader(int base_path_id);
22 void OnExtensionListsUpdated(const base::DictionaryValue* prefs);
24 private:
25 friend class base::RefCountedThreadSafe<ExternalLoader>;
27 virtual ~ExternalPrefCacheLoader();
29 virtual void StartLoading() OVERRIDE;
30 virtual void LoadFinished() OVERRIDE;
32 DISALLOW_COPY_AND_ASSIGN(ExternalPrefCacheLoader);
35 } // namespace chromeos
37 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_