| 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 <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 &string_path)) { | 287 &string_path)) { |
| 288 path = base::FilePath::FromUTF8Unsafe(string_path); | 288 path = base::FilePath::FromUTF8Unsafe(string_path); |
| 289 } | 289 } |
| 290 return path; | 290 return path; |
| 291 } | 291 } |
| 292 | 292 |
| 293 void SetLastChooseEntryDirectory(ExtensionPrefs* prefs, | 293 void SetLastChooseEntryDirectory(ExtensionPrefs* prefs, |
| 294 const std::string& extension_id, | 294 const std::string& extension_id, |
| 295 const base::FilePath& path) { | 295 const base::FilePath& path) { |
| 296 prefs->UpdateExtensionPref(extension_id, kLastChooseEntryDirectory, | 296 prefs->UpdateExtensionPref(extension_id, kLastChooseEntryDirectory, |
| 297 base::WrapUnique(base::CreateFilePathValue(path))); | 297 base::CreateFilePathValue(path)); |
| 298 } | 298 } |
| 299 | 299 |
| 300 #if defined(OS_CHROMEOS) | 300 #if defined(OS_CHROMEOS) |
| 301 void DispatchVolumeListChangeEvent(Profile* profile) { | 301 void DispatchVolumeListChangeEvent(Profile* profile) { |
| 302 DCHECK(profile); | 302 DCHECK(profile); |
| 303 EventRouter* const event_router = EventRouter::Get(profile); | 303 EventRouter* const event_router = EventRouter::Get(profile); |
| 304 if (!event_router) // Possible on shutdown. | 304 if (!event_router) // Possible on shutdown. |
| 305 return; | 305 return; |
| 306 | 306 |
| 307 ExtensionRegistry* const registry = ExtensionRegistry::Get(profile); | 307 ExtensionRegistry* const registry = ExtensionRegistry::Get(profile); |
| (...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 return RespondNow(Error(kNotSupportedOnNonKioskSessionError)); | 1434 return RespondNow(Error(kNotSupportedOnNonKioskSessionError)); |
| 1435 std::vector<api::file_system::Volume> result_volume_list; | 1435 std::vector<api::file_system::Volume> result_volume_list; |
| 1436 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); | 1436 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); |
| 1437 | 1437 |
| 1438 return RespondNow(ArgumentList( | 1438 return RespondNow(ArgumentList( |
| 1439 api::file_system::GetVolumeList::Results::Create(result_volume_list))); | 1439 api::file_system::GetVolumeList::Results::Create(result_volume_list))); |
| 1440 } | 1440 } |
| 1441 #endif | 1441 #endif |
| 1442 | 1442 |
| 1443 } // namespace extensions | 1443 } // namespace extensions |
| OLD | NEW |