| OLD | NEW |
| 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/extensions/api/file_system/file_system_api.h" | 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 } | 290 } |
| 291 | 291 |
| 292 void SetLastChooseEntryDirectory(ExtensionPrefs* prefs, | 292 void SetLastChooseEntryDirectory(ExtensionPrefs* prefs, |
| 293 const std::string& extension_id, | 293 const std::string& extension_id, |
| 294 const base::FilePath& path) { | 294 const base::FilePath& path) { |
| 295 prefs->UpdateExtensionPref(extension_id, | 295 prefs->UpdateExtensionPref(extension_id, |
| 296 kLastChooseEntryDirectory, | 296 kLastChooseEntryDirectory, |
| 297 base::CreateFilePathValue(path)); | 297 base::CreateFilePathValue(path)); |
| 298 } | 298 } |
| 299 | 299 |
| 300 std::vector<base::FilePath> GetGrayListedDirectories() { | |
| 301 std::vector<base::FilePath> graylisted_directories; | |
| 302 for (size_t i = 0; i < arraysize(kGraylistedPaths); ++i) { | |
| 303 base::FilePath graylisted_path; | |
| 304 if (PathService::Get(kGraylistedPaths[i], &graylisted_path)) | |
| 305 graylisted_directories.push_back(graylisted_path); | |
| 306 } | |
| 307 return graylisted_directories; | |
| 308 } | |
| 309 | |
| 310 #if defined(OS_CHROMEOS) | 300 #if defined(OS_CHROMEOS) |
| 311 void DispatchVolumeListChangeEvent(Profile* profile) { | 301 void DispatchVolumeListChangeEvent(Profile* profile) { |
| 312 DCHECK(profile); | 302 DCHECK(profile); |
| 313 EventRouter* const event_router = EventRouter::Get(profile); | 303 EventRouter* const event_router = EventRouter::Get(profile); |
| 314 if (!event_router) // Possible on shutdown. | 304 if (!event_router) // Possible on shutdown. |
| 315 return; | 305 return; |
| 316 | 306 |
| 317 ExtensionRegistry* const registry = ExtensionRegistry::Get(profile); | 307 ExtensionRegistry* const registry = ExtensionRegistry::Get(profile); |
| 318 if (!registry) // Possible on shutdown. | 308 if (!registry) // Possible on shutdown. |
| 319 return; | 309 return; |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 using api::file_system::Volume; | 1447 using api::file_system::Volume; |
| 1458 std::vector<linked_ptr<Volume>> result_volume_list; | 1448 std::vector<linked_ptr<Volume>> result_volume_list; |
| 1459 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); | 1449 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); |
| 1460 | 1450 |
| 1461 return RespondNow(ArgumentList( | 1451 return RespondNow(ArgumentList( |
| 1462 api::file_system::GetVolumeList::Results::Create(result_volume_list))); | 1452 api::file_system::GetVolumeList::Results::Create(result_volume_list))); |
| 1463 } | 1453 } |
| 1464 #endif | 1454 #endif |
| 1465 | 1455 |
| 1466 } // namespace extensions | 1456 } // namespace extensions |
| OLD | NEW |