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

Side by Side Diff: chrome/browser/geolocation/geolocation_infobar_delegate_android.cc

Issue 1843063002: Don't show scheme in permission prompts if it is HTTPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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_android.h" 5 #include "chrome/browser/geolocation/geolocation_infobar_delegate_android.h"
6 6
7 #include "chrome/browser/android/android_theme_resources.h" 7 #include "chrome/browser/android/android_theme_resources.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "components/infobars/core/infobar.h" 10 #include "components/infobars/core/infobar.h"
11 #include "components/url_formatter/elide_url.h"
12 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
13 #include "ui/base/l10n/l10n_util.h"
14 12
15 // static 13 // static
16 infobars::InfoBar* GeolocationInfoBarDelegateAndroid::Create( 14 infobars::InfoBar* GeolocationInfoBarDelegateAndroid::Create(
17 InfoBarService* infobar_service, 15 InfoBarService* infobar_service,
18 const GURL& requesting_frame, 16 const GURL& requesting_frame,
19 const PermissionSetCallback& callback) { 17 const PermissionSetCallback& callback) {
20 return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar( 18 return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
21 std::unique_ptr<ConfirmInfoBarDelegate>( 19 std::unique_ptr<ConfirmInfoBarDelegate>(
22 new GeolocationInfoBarDelegateAndroid(requesting_frame, callback)))); 20 new GeolocationInfoBarDelegateAndroid(requesting_frame, callback))));
23 } 21 }
(...skipping 11 matching lines...) Expand all
35 33
36 infobars::InfoBarDelegate::InfoBarIdentifier 34 infobars::InfoBarDelegate::InfoBarIdentifier
37 GeolocationInfoBarDelegateAndroid::GetIdentifier() const { 35 GeolocationInfoBarDelegateAndroid::GetIdentifier() const {
38 return GEOLOCATION_INFOBAR_DELEGATE_ANDROID; 36 return GEOLOCATION_INFOBAR_DELEGATE_ANDROID;
39 } 37 }
40 38
41 int GeolocationInfoBarDelegateAndroid::GetIconId() const { 39 int GeolocationInfoBarDelegateAndroid::GetIconId() const {
42 return IDR_ANDROID_INFOBAR_GEOLOCATION; 40 return IDR_ANDROID_INFOBAR_GEOLOCATION;
43 } 41 }
44 42
45 base::string16 GeolocationInfoBarDelegateAndroid::GetMessageText() const { 43 int GeolocationInfoBarDelegateAndroid::GetMessageResourceId() const {
46 return l10n_util::GetStringFUTF16(IDS_GEOLOCATION_INFOBAR_QUESTION, 44 return IDS_GEOLOCATION_INFOBAR_QUESTION;
47 url_formatter::FormatUrlForSecurityDisplay(
48 requesting_frame_));
49 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698