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

Side by Side Diff: chrome/browser/extensions/updater/extension_cache_impl.h

Issue 560913006: Changing the Weakptr initialization order in chrome/browser/extension folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_
6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 private: 50 private:
51 friend struct DefaultSingletonTraits<ExtensionCacheImpl>; 51 friend struct DefaultSingletonTraits<ExtensionCacheImpl>;
52 52
53 ExtensionCacheImpl(); 53 ExtensionCacheImpl();
54 virtual ~ExtensionCacheImpl(); 54 virtual ~ExtensionCacheImpl();
55 55
56 // Callback that is called when local cache is ready. 56 // Callback that is called when local cache is ready.
57 void OnCacheInitialized(); 57 void OnCacheInitialized();
58 58
59 // Weak factory for callbacks.
60 base::WeakPtrFactory<ExtensionCacheImpl> weak_ptr_factory_;
61
62 // Cache implementation that uses local cache dir. 59 // Cache implementation that uses local cache dir.
63 scoped_ptr<LocalExtensionCache> cache_; 60 scoped_ptr<LocalExtensionCache> cache_;
64 61
65 // Set of extensions that can be cached. 62 // Set of extensions that can be cached.
66 std::set<std::string> allowed_extensions_; 63 std::set<std::string> allowed_extensions_;
67 64
68 // List of callbacks that should be called when the cache is ready. 65 // List of callbacks that should be called when the cache is ready.
69 std::vector<base::Closure> init_callbacks_; 66 std::vector<base::Closure> init_callbacks_;
70 67
71 // Observes failures to install CRX files. 68 // Observes failures to install CRX files.
72 content::NotificationRegistrar notification_registrar_; 69 content::NotificationRegistrar notification_registrar_;
73 70
71 // Weak factory for callbacks.
72 base::WeakPtrFactory<ExtensionCacheImpl> weak_ptr_factory_;
73
74 DISALLOW_COPY_AND_ASSIGN(ExtensionCacheImpl); 74 DISALLOW_COPY_AND_ASSIGN(ExtensionCacheImpl);
75 }; 75 };
76 76
77 } // namespace extensions 77 } // namespace extensions
78 78
79 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_ 79 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_CACHE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/tab_helper.cc ('k') | chrome/browser/extensions/updater/extension_cache_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698