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

Unified Diff: chrome/browser/chrome_page_zoom.cc

Issue 373733003: Make sure WebContents passed to chrome_page_zoom::Zoom() have a ZoomController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_page_zoom.cc
diff --git a/chrome/browser/chrome_page_zoom.cc b/chrome/browser/chrome_page_zoom.cc
index 95ec05a5ccb0ec0f3cdd6160db94d83b18c0dd13..a76744cbd02726a014963ef561a07e13fc13b2d2 100644
--- a/chrome/browser/chrome_page_zoom.cc
+++ b/chrome/browser/chrome_page_zoom.cc
@@ -70,6 +70,11 @@ void Zoom(content::WebContents* web_contents, content::PageZoom zoom) {
ZoomController* zoom_controller =
ZoomController::FromWebContents(web_contents);
Peter Kasting 2014/07/08 19:16:42 Nit: Extra blank line
wjmaclean 2014/07/08 20:51:21 Done.
+ if (!zoom_controller) {
+ NOTREACHED();
Peter Kasting 2014/07/08 19:16:43 This is banned by the style guide. If |zoom_contr
wjmaclean 2014/07/08 20:51:21 I was hoping to generate well-documented failures
Peter Kasting 2014/07/08 20:52:47 Yeah, DCHECK is correct for what you describe. Th
+ return;
+ }
+
double current_zoom_level = zoom_controller->GetZoomLevel();
double default_zoom_level =
Profile::FromBrowserContext(web_contents->GetBrowserContext())->
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698