| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "chrome/browser/geolocation/geolocation_infobar_delegate.h" | 5 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "chrome/browser/content_settings/permission_queue_controller.h" | 8 #include "chrome/browser/content_settings/permission_queue_controller.h" |
| 9 #include "chrome/browser/infobars/infobar_service.h" | 9 #include "chrome/browser/infobars/infobar_service.h" |
| 10 #include "chrome/grit/generated_resources.h" |
| 10 #include "components/google/core/browser/google_util.h" | 11 #include "components/google/core/browser/google_util.h" |
| 11 #include "components/infobars/core/infobar.h" | 12 #include "components/infobars/core/infobar.h" |
| 12 #include "content/public/browser/navigation_details.h" | 13 #include "content/public/browser/navigation_details.h" |
| 13 #include "content/public/browser/navigation_entry.h" | 14 #include "content/public/browser/navigation_entry.h" |
| 14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 15 #include "grit/generated_resources.h" | |
| 16 #include "grit/locale_settings.h" | 16 #include "grit/locale_settings.h" |
| 17 #include "grit/theme_resources.h" | 17 #include "grit/theme_resources.h" |
| 18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 | 20 |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 enum GeolocationInfoBarDelegateEvent { | 24 enum GeolocationInfoBarDelegateEvent { |
| 25 // NOTE: Do not renumber these as that would confuse interpretation of | 25 // NOTE: Do not renumber these as that would confuse interpretation of |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? | 148 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? |
| 149 IDS_GEOLOCATION_ALLOW_BUTTON : IDS_GEOLOCATION_DENY_BUTTON); | 149 IDS_GEOLOCATION_ALLOW_BUTTON : IDS_GEOLOCATION_DENY_BUTTON); |
| 150 } | 150 } |
| 151 | 151 |
| 152 bool GeolocationInfoBarDelegate::Cancel() { | 152 bool GeolocationInfoBarDelegate::Cancel() { |
| 153 RecordUmaEvent(GEOLOCATION_INFO_BAR_DELEGATE_EVENT_DENY); | 153 RecordUmaEvent(GEOLOCATION_INFO_BAR_DELEGATE_EVENT_DENY); |
| 154 set_user_has_interacted(); | 154 set_user_has_interacted(); |
| 155 SetPermission(true, false); | 155 SetPermission(true, false); |
| 156 return true; | 156 return true; |
| 157 } | 157 } |
| OLD | NEW |