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

Unified Diff: chrome/browser/media_galleries/media_galleries_dialog_controller.cc

Issue 37553002: [MediaGalleries] Add context menu for forgetting galleries. [views] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dlgfix
Patch Set: . Created 7 years, 2 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
Index: chrome/browser/media_galleries/media_galleries_dialog_controller.cc
diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller.cc b/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
index e4202eb976fd7a6f45bfd004678d2f049835b53a..9ba1a9555b4c245f94799d681a69918468181674 100644
--- a/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
+++ b/chrome/browser/media_galleries/media_galleries_dialog_controller.cc
@@ -116,6 +116,10 @@ string16 MediaGalleriesDialogController::GetUnattachedLocationsHeader() const {
return l10n_util::GetStringUTF16(IDS_MEDIA_GALLERIES_UNATTACHED_LOCATIONS);
}
+string16 MediaGalleriesDialogController::GetForgetMenuCommand() const {
+ return l10n_util::GetStringUTF16(IDS_MEDIA_GALLERIES_DIALOG_FORGET);
+}
+
// TODO(gbillock): Call this something a bit more connected to the
// messaging in the dialog.
bool MediaGalleriesDialogController::HasPermittedGalleries() const {
@@ -218,6 +222,12 @@ void MediaGalleriesDialogController::DidToggleNewGallery(
}
}
+void MediaGalleriesDialogController::DidForgetGallery(
+ MediaGalleryPrefId pref_id) {
+ DCHECK(preferences_);
+ preferences_->ForgetGalleryById(pref_id);
+}
+
void MediaGalleriesDialogController::DialogFinished(bool accepted) {
// The dialog has finished, so there is no need to watch for more updates
// from |preferences_|. Do this here and not in the dtor since this is the

Powered by Google App Engine
This is Rietveld 408576698