| 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/chromeos/extensions/file_manager/file_tasks.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/file_tasks.h" |
| 6 | 6 |
| 7 #include "apps/launcher.h" | 7 #include "apps/launcher.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 } | 424 } |
| 425 | 425 |
| 426 void FindFileBrowserHandlerTasks( | 426 void FindFileBrowserHandlerTasks( |
| 427 Profile* profile, | 427 Profile* profile, |
| 428 const std::vector<GURL>& file_urls, | 428 const std::vector<GURL>& file_urls, |
| 429 std::vector<FullTaskDescriptor>* result_list) { | 429 std::vector<FullTaskDescriptor>* result_list) { |
| 430 DCHECK(!file_urls.empty()); | 430 DCHECK(!file_urls.empty()); |
| 431 DCHECK(result_list); | 431 DCHECK(result_list); |
| 432 | 432 |
| 433 file_browser_handlers::FileBrowserHandlerList common_tasks = | 433 file_browser_handlers::FileBrowserHandlerList common_tasks = |
| 434 file_browser_handlers::FindCommonFileBrowserHandlers(profile, file_urls); | 434 file_browser_handlers::FindFileBrowserHandlers(profile, file_urls); |
| 435 if (common_tasks.empty()) | 435 if (common_tasks.empty()) |
| 436 return; | 436 return; |
| 437 | 437 |
| 438 ExtensionService* service = | 438 ExtensionService* service = |
| 439 extensions::ExtensionSystem::Get(profile)->extension_service(); | 439 extensions::ExtensionSystem::Get(profile)->extension_service(); |
| 440 for (file_browser_handlers::FileBrowserHandlerList::const_iterator iter = | 440 for (file_browser_handlers::FileBrowserHandlerList::const_iterator iter = |
| 441 common_tasks.begin(); | 441 common_tasks.begin(); |
| 442 iter != common_tasks.end(); | 442 iter != common_tasks.end(); |
| 443 ++iter) { | 443 ++iter) { |
| 444 const FileBrowserHandler* handler = *iter; | 444 const FileBrowserHandler* handler = *iter; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 if (file_browser_handlers::IsFallbackFileBrowserHandler( | 551 if (file_browser_handlers::IsFallbackFileBrowserHandler( |
| 552 task->task_descriptor())) { | 552 task->task_descriptor())) { |
| 553 task->set_is_default(true); | 553 task->set_is_default(true); |
| 554 return; | 554 return; |
| 555 } | 555 } |
| 556 } | 556 } |
| 557 } | 557 } |
| 558 | 558 |
| 559 } // namespace file_tasks | 559 } // namespace file_tasks |
| 560 } // namespace file_manager | 560 } // namespace file_manager |
| OLD | NEW |