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

Side by Side Diff: chrome/browser/media_gallery/media_galleries_dialog_controller.cc

Issue 11308053: Merge 167819 - Fix crash when programatically closing media gallery dialog (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/media_gallery/media_galleries_dialog_controller.h" 5 #include "chrome/browser/media_gallery/media_galleries_dialog_controller.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/media_gallery/media_file_system_registry.h" 9 #include "chrome/browser/media_gallery/media_file_system_registry.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 on_finish_.Run(); 110 on_finish_.Run();
111 delete this; 111 delete this;
112 } 112 }
113 113
114 const MediaGalleriesDialogController::KnownGalleryPermissions& 114 const MediaGalleriesDialogController::KnownGalleryPermissions&
115 MediaGalleriesDialogController::permissions() const { 115 MediaGalleriesDialogController::permissions() const {
116 return known_galleries_; 116 return known_galleries_;
117 } 117 }
118 118
119 content::WebContents* MediaGalleriesDialogController::web_contents() const {
120 return web_contents_;
121 }
122
119 void MediaGalleriesDialogController::FileSelected(const FilePath& path, 123 void MediaGalleriesDialogController::FileSelected(const FilePath& path,
120 int index, 124 int index,
121 void* params) { 125 void* params) {
122 // Try to find it in |known_galleries_|. 126 // Try to find it in |known_galleries_|.
123 MediaGalleryPrefInfo gallery; 127 MediaGalleryPrefInfo gallery;
124 if (preferences_->LookUpGalleryByPath(path, &gallery) && 128 if (preferences_->LookUpGalleryByPath(path, &gallery) &&
125 gallery.type != MediaGalleryPrefInfo::kBlackListed) { 129 gallery.type != MediaGalleryPrefInfo::kBlackListed) {
126 KnownGalleryPermissions::iterator iter = 130 KnownGalleryPermissions::iterator iter =
127 known_galleries_.find(gallery.pref_id); 131 known_galleries_.find(gallery.pref_id);
128 132
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 preferences_->SetGalleryPermissionForExtension( 196 preferences_->SetGalleryPermissionForExtension(
193 *extension_, id, true); 197 *extension_, id, true);
194 } 198 }
195 } 199 }
196 200
197 // MediaGalleries dialog ------------------------------------------------------- 201 // MediaGalleries dialog -------------------------------------------------------
198 202
199 MediaGalleriesDialog::~MediaGalleriesDialog() {} 203 MediaGalleriesDialog::~MediaGalleriesDialog() {}
200 204
201 } // namespace chrome 205 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698