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 <cmath> | 5 #include <cmath> |
6 #include <set> | 6 #include <set> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 IsElementSignificantlyDifferent(o1.can_provide_gamma_, | 182 IsElementSignificantlyDifferent(o1.can_provide_gamma_, |
183 o2.can_provide_gamma_, | 183 o2.can_provide_gamma_, |
184 o1.gamma_, | 184 o1.gamma_, |
185 o2.gamma_); | 185 o2.gamma_); |
186 } | 186 } |
187 | 187 |
188 int ProviderImpl::SamplingIntervalMs() const { | 188 int ProviderImpl::SamplingIntervalMs() const { |
189 DCHECK(MessageLoop::current() == polling_thread_->message_loop()); | 189 DCHECK(MessageLoop::current() == polling_thread_->message_loop()); |
190 DCHECK(data_fetcher_.get()); | 190 DCHECK(data_fetcher_.get()); |
191 | 191 |
192 int fetcher_interval = data_fetcher_->MinSamplingIntervalMs(); | 192 // TODO(erg): There used to be unused code here, that called a default |
193 | 193 // implementation on the DataFetcherInterface that was never defined. I'm |
194 if (fetcher_interval > kDesiredSamplingIntervalMs) | 194 // removing unused methods from headers. |
195 return fetcher_interval; | 195 return kDesiredSamplingIntervalMs; |
Lei Zhang
2010/12/16 21:31:51
+hans, fyi
| |
196 else | |
197 return kDesiredSamplingIntervalMs; | |
198 } | 196 } |
199 | 197 |
200 } // namespace device_orientation | 198 } // namespace device_orientation |
OLD | NEW |