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

Unified Diff: chrome/browser/storage/durable_storage_permission_infobar_delegate.cc

Issue 1164073005: Allow script to request durable storage permission (chrome side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix conflicts after midi constant permission landed Created 5 years, 4 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 | « chrome/browser/storage/durable_storage_permission_infobar_delegate.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/storage/durable_storage_permission_infobar_delegate.cc
diff --git a/chrome/browser/media/midi_permission_infobar_delegate.cc b/chrome/browser/storage/durable_storage_permission_infobar_delegate.cc
similarity index 53%
copy from chrome/browser/media/midi_permission_infobar_delegate.cc
copy to chrome/browser/storage/durable_storage_permission_infobar_delegate.cc
index 40cc6944c9c372eb67d7001174c876f2b9dc7114..6657a4941083f3bd32ac0bcaee96a1db41c9efab 100644
--- a/chrome/browser/media/midi_permission_infobar_delegate.cc
+++ b/chrome/browser/storage/durable_storage_permission_infobar_delegate.cc
@@ -2,52 +2,49 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/media/midi_permission_infobar_delegate.h"
+#include "chrome/browser/storage/durable_storage_permission_infobar_delegate.h"
+#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/grit/generated_resources.h"
#include "components/infobars/core/infobar.h"
#include "components/url_formatter/url_formatter.h"
#include "grit/theme_resources.h"
+#include "net/base/escape.h"
#include "ui/base/l10n/l10n_util.h"
// static
-infobars::InfoBar* MidiPermissionInfoBarDelegate::Create(
+infobars::InfoBar* DurableStoragePermissionInfoBarDelegate::Create(
InfoBarService* infobar_service,
PermissionQueueController* controller,
const PermissionRequestID& id,
const GURL& requesting_frame,
const std::string& display_languages,
ContentSettingsType type) {
- return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new MidiPermissionInfoBarDelegate(
- controller, id, requesting_frame, display_languages, type))));
+ return infobar_service->AddInfoBar(
+ infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
+ new DurableStoragePermissionInfoBarDelegate(
+ controller, id, requesting_frame, display_languages, type))));
}
-MidiPermissionInfoBarDelegate::MidiPermissionInfoBarDelegate(
- PermissionQueueController* controller,
- const PermissionRequestID& id,
- const GURL& requesting_frame,
- const std::string& display_languages,
- ContentSettingsType type)
+DurableStoragePermissionInfoBarDelegate::
+ DurableStoragePermissionInfoBarDelegate(
+ PermissionQueueController* controller,
+ const PermissionRequestID& id,
+ const GURL& requesting_frame,
+ const std::string& display_languages,
+ ContentSettingsType type)
: PermissionInfobarDelegate(controller, id, requesting_frame, type),
requesting_frame_(requesting_frame),
display_languages_(display_languages) {
}
-MidiPermissionInfoBarDelegate::~MidiPermissionInfoBarDelegate() {
-}
-
-int MidiPermissionInfoBarDelegate::GetIconID() const {
- return IDR_INFOBAR_MIDI;
-}
-
-base::string16 MidiPermissionInfoBarDelegate::GetMessageText() const {
+base::string16 DurableStoragePermissionInfoBarDelegate::GetMessageText() const {
return l10n_util::GetStringFUTF16(
- IDS_MIDI_SYSEX_INFOBAR_QUESTION,
+ IDS_DURABLE_STORAGE_INFOBAR_QUESTION,
url_formatter::FormatUrl(
requesting_frame_.GetOrigin(), display_languages_,
url_formatter::kFormatUrlOmitUsernamePassword |
url_formatter::kFormatUrlOmitTrailingSlashOnBareHostname,
- net::UnescapeRule::SPACES, nullptr, nullptr, nullptr));
+ net::UnescapeRule::SPACES, NULL, NULL, NULL));
}
« no previous file with comments | « chrome/browser/storage/durable_storage_permission_infobar_delegate.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698