summaryrefslogtreecommitdiffstats
path: root/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/geolocation/chrome_geolocation_permission_context.cc')
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
index 7d61875..53d0b2f 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
@@ -21,8 +21,8 @@
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/view_type_utils.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/chrome_view_type.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
@@ -624,8 +624,7 @@ void ChromeGeolocationPermissionContext::RequestGeolocationPermission(
WebContents* web_contents =
tab_util::GetWebContentsByID(render_process_id, render_view_id);
- if (!web_contents || web_contents->GetViewType() !=
- chrome::VIEW_TYPE_TAB_CONTENTS) {
+ if (chrome::GetViewType(web_contents) != chrome::VIEW_TYPE_TAB_CONTENTS) {
// The tab may have gone away, or the request may not be from a tab at all.
// TODO(mpcomplete): the request could be from a background page or
// extension popup (tab_contents will have a different ViewType). But why do