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

Unified Diff: content/browser/screen_orientation/screen_orientation_dispatcher_host.cc

Issue 408213003: Cleanups in ScreenOrientationDispatcherHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc b/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
index de5b089703fb5a227ad3676c347f6f93b3205b23..787228d1d003154f8eeab03e09e53d76cacdbf25 100644
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
@@ -102,16 +102,16 @@ void ScreenOrientationDispatcherHost::OnLockRequest(
blink::WebLockOrientationErrorCanceled);
}
- current_lock_ = new LockInformation(request_id,
- render_frame_host->GetProcess()->GetID(),
- render_frame_host->GetRoutingID());
-
if (!provider_) {
NotifyLockError(request_id,
blink::WebLockOrientationErrorNotAvailable);
return;
}
+ current_lock_ = new LockInformation(request_id,
+ render_frame_host->GetProcess()->GetID(),
+ render_frame_host->GetRoutingID());
+
provider_->LockOrientation(request_id, orientation);
}
@@ -122,7 +122,7 @@ void ScreenOrientationDispatcherHost::OnUnlockRequest(
blink::WebLockOrientationErrorCanceled);
}
- if (!provider_.get())
+ if (!provider_)
return;
provider_->UnlockOrientation();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698