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

Unified Diff: chrome/browser/device_orientation/provider.cc

Issue 3136008: Implement device_orientation::Provider. (Closed)
Patch Set: Patch Created 10 years, 4 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 | « chrome/browser/device_orientation/provider.h ('k') | chrome/browser/device_orientation/provider_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/device_orientation/provider.cc
diff --git a/chrome/browser/device_orientation/provider.cc b/chrome/browser/device_orientation/provider.cc
index 16b24b388ab0c77d7332b954d7dd3f1694762b84..d1d335b499c97e7577eb786dad69a926e19dce8e 100644
--- a/chrome/browser/device_orientation/provider.cc
+++ b/chrome/browser/device_orientation/provider.cc
@@ -4,13 +4,20 @@
#include "chrome/browser/device_orientation/provider.h"
+#include "base/logging.h"
+#include "chrome/browser/chrome_thread.h"
+#include "chrome/browser/device_orientation/data_fetcher.h"
+#include "chrome/browser/device_orientation/provider_impl.h"
+
namespace device_orientation {
Provider* Provider::GetInstance() {
- if (!instance_)
- // TODO(hans) This is not finished. We will create an instance of the real
- // Provider implementation once it is implemented.
- instance_ = new Provider();
+ if (!instance_) {
+ DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
+ const ProviderImpl::DataFetcherFactory default_factories[] = { NULL };
+
+ instance_ = new ProviderImpl(MessageLoop::current(), default_factories);
+ }
return instance_;
}
« no previous file with comments | « chrome/browser/device_orientation/provider.h ('k') | chrome/browser/device_orientation/provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698