OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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. |
| 4 |
| 5 #include "chrome/browser/device_orientation/provider.h" |
| 6 |
| 7 namespace device_orientation { |
| 8 |
| 9 Provider* Provider::GetInstance() { |
| 10 if (!instance_) |
| 11 // TODO(hans) This is not finished. We will create an instance of the real |
| 12 // Provider implementation once it is implemented. |
| 13 instance_ = new Provider(); |
| 14 return instance_; |
| 15 } |
| 16 |
| 17 void Provider::SetInstanceForTests(Provider* provider) { |
| 18 DCHECK(!instance_); |
| 19 instance_ = provider; |
| 20 } |
| 21 |
| 22 Provider* Provider::instance_ = NULL; |
| 23 |
| 24 } // namespace device_orientation |
OLD | NEW |