summaryrefslogtreecommitdiffstats
path: root/chrome/browser/device_orientation
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-09 02:04:17 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-09 02:04:17 +0000
commitaad8e8ffb7ccdecd012a427e47bffb454e08bded (patch)
tree4df4ca8ac0eae9cd80449665caec58fdcb7f399a /chrome/browser/device_orientation
parent556aa68d7645a4e3e802ab304bdc85e240f25747 (diff)
downloadchromium_src-aad8e8ffb7ccdecd012a427e47bffb454e08bded.zip
chromium_src-aad8e8ffb7ccdecd012a427e47bffb454e08bded.tar.gz
chromium_src-aad8e8ffb7ccdecd012a427e47bffb454e08bded.tar.bz2
Coverity: Pass parameters by reference.
CID=2620,2654,2656,2657,2694,2701,2718,8074,8075,8076,8077,8078, 8079,8080,8082,8083,8406,8407,8408,8730,9160,11282,11897,12722, 12724 BUG=none TEST=none Review URL: http://codereview.chromium.org/4623001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65469 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/device_orientation')
-rw-r--r--chrome/browser/device_orientation/orientation.h2
-rw-r--r--chrome/browser/device_orientation/provider_impl.cc4
-rw-r--r--chrome/browser/device_orientation/provider_impl.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/device_orientation/orientation.h b/chrome/browser/device_orientation/orientation.h
index 2193170..de876c9 100644
--- a/chrome/browser/device_orientation/orientation.h
+++ b/chrome/browser/device_orientation/orientation.h
@@ -36,7 +36,7 @@ class Orientation {
static Orientation Empty() { return Orientation(); }
- bool IsEmpty() {
+ bool IsEmpty() const {
return !can_provide_alpha_ && !can_provide_beta_ && !can_provide_gamma_;
}
diff --git a/chrome/browser/device_orientation/provider_impl.cc b/chrome/browser/device_orientation/provider_impl.cc
index 81ecfa3..e5e2397 100644
--- a/chrome/browser/device_orientation/provider_impl.cc
+++ b/chrome/browser/device_orientation/provider_impl.cc
@@ -99,7 +99,7 @@ void ProviderImpl::ScheduleInitializePollingThread() {
polling_loop->PostTask(FROM_HERE, task);
}
-void ProviderImpl::DoNotify(Orientation orientation) {
+void ProviderImpl::DoNotify(const Orientation& orientation) {
DCHECK(MessageLoop::current() == creator_loop_);
last_notification_ = orientation;
@@ -115,7 +115,7 @@ void ProviderImpl::DoNotify(Orientation orientation) {
}
}
-void ProviderImpl::ScheduleDoNotify(Orientation orientation) {
+void ProviderImpl::ScheduleDoNotify(const Orientation& orientation) {
DCHECK(MessageLoop::current() == polling_thread_->message_loop());
Task* task = NewRunnableMethod(this, &ProviderImpl::DoNotify, orientation);
diff --git a/chrome/browser/device_orientation/provider_impl.h b/chrome/browser/device_orientation/provider_impl.h
index d984062..7396035 100644
--- a/chrome/browser/device_orientation/provider_impl.h
+++ b/chrome/browser/device_orientation/provider_impl.h
@@ -52,8 +52,8 @@ class ProviderImpl : public Provider {
// Method for notifying observers of an orientation update.
// Runs on the creator_thread_.
- void DoNotify(Orientation orientation);
- void ScheduleDoNotify(Orientation orientation);
+ void DoNotify(const Orientation& orientation);
+ void ScheduleDoNotify(const Orientation& orientation);
static bool SignificantlyDifferent(const Orientation& orientation1,
const Orientation& orientation2);