OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/device_orientation/provider.h" | 5 #include "chrome/browser/device_orientation/provider.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/chrome_thread.h" | 8 #include "chrome/browser/chrome_thread.h" |
9 | 9 |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 void Provider::SetInstanceForTests(Provider* provider) { | 34 void Provider::SetInstanceForTests(Provider* provider) { |
35 DCHECK(!instance_); | 35 DCHECK(!instance_); |
36 instance_ = provider; | 36 instance_ = provider; |
37 } | 37 } |
38 | 38 |
39 Provider* Provider::GetInstanceForTests() { | 39 Provider* Provider::GetInstanceForTests() { |
40 return instance_; | 40 return instance_; |
41 } | 41 } |
42 | 42 |
| 43 Provider::Provider() { |
| 44 } |
| 45 |
| 46 Provider::~Provider() { |
| 47 DCHECK(instance_ == this); |
| 48 instance_ = NULL; |
| 49 } |
| 50 |
43 Provider* Provider::instance_ = NULL; | 51 Provider* Provider::instance_ = NULL; |
44 | 52 |
45 } // namespace device_orientation | 53 } // namespace device_orientation |
OLD | NEW |