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

Side by Side Diff: chrome/browser/storage/durable_storage_permission_infobar_delegate_android.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit again Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/storage/durable_storage_permission_infobar_delegate_and roid.h" 5 #include "chrome/browser/storage/durable_storage_permission_infobar_delegate_and roid.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.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"
(...skipping 19 matching lines...) Expand all
30 const GURL& requesting_frame, 30 const GURL& requesting_frame,
31 const std::string& display_languages, 31 const std::string& display_languages,
32 const PermissionSetCallback& callback) 32 const PermissionSetCallback& callback)
33 : PermissionInfobarDelegate(requesting_frame, 33 : PermissionInfobarDelegate(requesting_frame,
34 content::PermissionType::DURABLE_STORAGE, 34 content::PermissionType::DURABLE_STORAGE,
35 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, 35 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE,
36 callback), 36 callback),
37 requesting_frame_(requesting_frame), 37 requesting_frame_(requesting_frame),
38 display_languages_(display_languages) {} 38 display_languages_(display_languages) {}
39 39
40 infobars::InfoBarDelegate::InfoBarIdentifier
41 DurableStoragePermissionInfoBarDelegateAndroid::GetIdentifier() const {
42 return DURABLE_STORAGE_PERMISSION_INFOBAR_DELEGATE_ANDROID;
43 }
44
40 base::string16 DurableStoragePermissionInfoBarDelegateAndroid::GetMessageText() 45 base::string16 DurableStoragePermissionInfoBarDelegateAndroid::GetMessageText()
41 const { 46 const {
42 return l10n_util::GetStringFUTF16( 47 return l10n_util::GetStringFUTF16(
43 IDS_DURABLE_STORAGE_INFOBAR_QUESTION, 48 IDS_DURABLE_STORAGE_INFOBAR_QUESTION,
44 url_formatter::FormatUrl( 49 url_formatter::FormatUrl(
45 requesting_frame_.GetOrigin(), display_languages_, 50 requesting_frame_.GetOrigin(), display_languages_,
46 url_formatter::kFormatUrlOmitUsernamePassword | 51 url_formatter::kFormatUrlOmitUsernamePassword |
47 url_formatter::kFormatUrlOmitTrailingSlashOnBareHostname, 52 url_formatter::kFormatUrlOmitTrailingSlashOnBareHostname,
48 net::UnescapeRule::SPACES, NULL, NULL, NULL)); 53 net::UnescapeRule::SPACES, NULL, NULL, NULL));
49 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698