Chromium Code Reviews
Help | Chromium Project | Sign in
(679)

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_api.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: '' Created 1 year, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
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 // Implements the Chrome Extensions Media Galleries API. 5 // Implements the Chrome Extensions Media Galleries API.
6 6
7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h" 7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h"
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 return true; 62 return true;
63 } 63 }
64 64
65 } // namespace 65 } // namespace
66 66
67 MediaGalleriesGetMediaFileSystemsFunction:: 67 MediaGalleriesGetMediaFileSystemsFunction::
68 ~MediaGalleriesGetMediaFileSystemsFunction() {} 68 ~MediaGalleriesGetMediaFileSystemsFunction() {}
69 69
70 bool MediaGalleriesGetMediaFileSystemsFunction::HasPermission() {
71 if (!ExtensionFunction::HasPermission())
72 return false;
73 MediaFileSystemRegistry::GetInstance()->AddAttachedMediaDeviceGalleries(
vandebo 2012/10/27 19:57:57 I think putting this here abuses it's use. Let ju
kmadhusu 2012/10/28 01:13:43 Moved this function call to the top of RunImpl() f
74 render_view_host());
75 return true;
76 }
77
70 bool MediaGalleriesGetMediaFileSystemsFunction::RunImpl() { 78 bool MediaGalleriesGetMediaFileSystemsFunction::RunImpl() {
71 if (!ApiIsAccessible(&error_)) 79 if (!ApiIsAccessible(&error_))
72 return false; 80 return false;
73 81
74 scoped_ptr<GetMediaFileSystems::Params> params( 82 scoped_ptr<GetMediaFileSystems::Params> params(
75 GetMediaFileSystems::Params::Create(*args_)); 83 GetMediaFileSystems::Params::Create(*args_));
76 EXTENSION_FUNCTION_VALIDATE(params.get()); 84 EXTENSION_FUNCTION_VALIDATE(params.get());
77 MediaGalleries::GetMediaFileSystemsInteractivity interactive = 85 MediaGalleries::GetMediaFileSystemsInteractivity interactive =
78 MediaGalleries::MEDIA_GALLERIES_GET_MEDIA_FILE_SYSTEMS_INTERACTIVITY_NO; 86 MediaGalleries::MEDIA_GALLERIES_GET_MEDIA_FILE_SYSTEMS_INTERACTIVITY_NO;
79 if (params->details.get() && params->details->interactive != MediaGalleries:: 87 if (params->details.get() && params->details->interactive != MediaGalleries::
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() { 206 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() {
199 if (!ApiIsAccessible(&error_)) 207 if (!ApiIsAccessible(&error_))
200 return false; 208 return false;
201 209
202 // TODO(vandebo) Update the metadata and return the new file. 210 // TODO(vandebo) Update the metadata and return the new file.
203 SetResult(Value::CreateNullValue()); 211 SetResult(Value::CreateNullValue());
204 return true; 212 return true;
205 } 213 }
206 214
207 } // namespace extensions 215 } // namespace extensions
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6