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

Unified Diff: content/browser/device_orientation/provider_impl.h

Issue 10837055: Changes ProviderImpl to use a single DataFetcherFactory (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Passes factory by value Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/device_orientation/provider.cc ('k') | content/browser/device_orientation/provider_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/device_orientation/provider_impl.h
diff --git a/content/browser/device_orientation/provider_impl.h b/content/browser/device_orientation/provider_impl.h
index 32c63691a6a531cc9ed313de23ac86aa1ce86115..6bc2bbe2648ea10c00d264caae6f10294f746228 100644
--- a/content/browser/device_orientation/provider_impl.h
+++ b/content/browser/device_orientation/provider_impl.h
@@ -24,9 +24,10 @@ class ProviderImpl : public Provider {
public:
typedef DataFetcher* (*DataFetcherFactory)();
- // Create a ProviderImpl that uses the NULL-terminated factories array to find
- // a DataFetcher that can provide orientation data.
- CONTENT_EXPORT ProviderImpl(const DataFetcherFactory factories[]);
+ // Create a ProviderImpl that uses the pointer to a factory to create a
hans 2012/08/02 10:19:31 we can just say "uses the factory to create a ..."
+ // DataFetcher that can provide orientation data. A NULL pointer indicates
+ // that there are no DataFetchers for this OS.
+ CONTENT_EXPORT ProviderImpl(DataFetcherFactory factory);
// From Provider.
virtual void AddObserver(Observer* observer) OVERRIDE;
@@ -52,7 +53,7 @@ class ProviderImpl : public Provider {
MessageLoop* creator_loop_;
// Members below are only to be used from the creator_loop_.
- std::vector<DataFetcherFactory> factories_;
+ DataFetcherFactory factory_;
std::set<Observer*> observers_;
Orientation last_notification_;
« no previous file with comments | « content/browser/device_orientation/provider.cc ('k') | content/browser/device_orientation/provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698