Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: chrome/browser/chromeos/extensions/external_pref_cache_loader.h

Issue 79363004: Merge 235370 "Destroy ExternalCacheDispatcher when last External..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/external_pref_cache_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_
7 7
8 #include "base/memory/ref_counted.h"
8 #include "chrome/browser/extensions/external_pref_loader.h" 9 #include "chrome/browser/extensions/external_pref_loader.h"
9 10
10 class Profile; 11 class Profile;
11 12
12 namespace chromeos { 13 namespace chromeos {
13 14
15 class ExternalCacheDispatcher;
16
14 // A specialization of the ExternalPrefLoader that caches crx files for external 17 // A specialization of the ExternalPrefLoader that caches crx files for external
15 // extensions with update URL in a common place for all users on the machine. 18 // extensions with update URL in a common place for all users on the machine.
16 class ExternalPrefCacheLoader : public extensions::ExternalPrefLoader { 19 class ExternalPrefCacheLoader : public extensions::ExternalPrefLoader {
17 public: 20 public:
18 // All instances of ExternalPrefCacheLoader use the same cache so 21 // All instances of ExternalPrefCacheLoader use the same cache so
19 // |base_path_id| must be the same for all profile in session. 22 // |base_path_id| must be the same for all profile in session.
20 // It is checked in run-time with CHECK. |profile| is used to check if the 23 // It is checked in run-time with CHECK. |profile| is used to check if the
21 // extension is installed to keep providing. 24 // extension is installed to keep providing.
22 ExternalPrefCacheLoader(int base_path_id, Profile* profile); 25 ExternalPrefCacheLoader(int base_path_id, Profile* profile);
23 26
24 void OnExtensionListsUpdated(const base::DictionaryValue* prefs); 27 void OnExtensionListsUpdated(const base::DictionaryValue* prefs);
25 28
26 private: 29 private:
27 friend class base::RefCountedThreadSafe<ExternalLoader>; 30 friend class base::RefCountedThreadSafe<ExternalLoader>;
28 31
29 virtual ~ExternalPrefCacheLoader(); 32 virtual ~ExternalPrefCacheLoader();
30 33
31 virtual void StartLoading() OVERRIDE; 34 virtual void StartLoading() OVERRIDE;
32 virtual void LoadFinished() OVERRIDE; 35 virtual void LoadFinished() OVERRIDE;
33 36
34 Profile* profile_; 37 Profile* profile_;
38 scoped_refptr<ExternalCacheDispatcher> cache_dispatcher_;
35 39
36 DISALLOW_COPY_AND_ASSIGN(ExternalPrefCacheLoader); 40 DISALLOW_COPY_AND_ASSIGN(ExternalPrefCacheLoader);
37 }; 41 };
38 42
39 } // namespace chromeos 43 } // namespace chromeos
40 44
41 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_ 45 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTERNAL_PREF_CACHE_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/external_pref_cache_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698