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

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

Issue 11304022: [Media Gallery] Add existing attached devices to the prefs in time for media galleries dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments 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_galleries_preferences_factory.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"
11 #include "chrome/browser/ui/chrome_select_file_policy.h" 11 #include "chrome/browser/ui/chrome_select_file_policy.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents.h" 12 #include "chrome/browser/ui/tab_contents/tab_contents.h"
13 #include "chrome/common/chrome_paths.h" 13 #include "chrome/common/chrome_paths.h"
14 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 #include "content/public/browser/web_contents_view.h" 16 #include "content/public/browser/web_contents_view.h"
17 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 19
20 using extensions::Extension; 20 using extensions::Extension;
21 21
22 namespace chrome { 22 namespace chrome {
23 23
24 MediaGalleriesDialogController::MediaGalleriesDialogController( 24 MediaGalleriesDialogController::MediaGalleriesDialogController(
25 content::WebContents* web_contents, 25 content::WebContents* web_contents,
26 const Extension& extension, 26 const Extension& extension,
27 const base::Closure& on_finish) 27 const base::Closure& on_finish)
28 : web_contents_(web_contents), 28 : web_contents_(web_contents),
29 extension_(&extension), 29 extension_(&extension),
30 on_finish_(on_finish), 30 on_finish_(on_finish),
31 preferences_(MediaGalleriesPreferencesFactory::GetForProfile( 31 preferences_(MediaFileSystemRegistry::GetInstance()->GetPreferences(
32 Profile::FromBrowserContext(web_contents->GetBrowserContext()))) { 32 Profile::FromBrowserContext(web_contents->GetBrowserContext()))) {
33 LookUpPermissions(); 33 LookUpPermissions();
34 34
35 dialog_.reset(MediaGalleriesDialog::Create(this)); 35 dialog_.reset(MediaGalleriesDialog::Create(this));
36 } 36 }
37 37
38 MediaGalleriesDialogController::MediaGalleriesDialogController() 38 MediaGalleriesDialogController::MediaGalleriesDialogController()
39 : web_contents_(NULL), 39 : web_contents_(NULL),
40 extension_(NULL), 40 extension_(NULL),
41 preferences_(NULL) {} 41 preferences_(NULL) {}
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 preferences_->SetGalleryPermissionForExtension( 192 preferences_->SetGalleryPermissionForExtension(
193 *extension_, id, true); 193 *extension_, id, true);
194 } 194 }
195 } 195 }
196 196
197 // MediaGalleries dialog ------------------------------------------------------- 197 // MediaGalleries dialog -------------------------------------------------------
198 198
199 MediaGalleriesDialog::~MediaGalleriesDialog() {} 199 MediaGalleriesDialog::~MediaGalleriesDialog() {}
200 200
201 } // namespace chrome 201 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698