| 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/file_manager/file_browser_handlers.h" | 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 const FileBrowserHandler* handler = handler_iter->get(); | 134 const FileBrowserHandler* handler = handler_iter->get(); |
| 135 if (!handler->MatchesURL(lowercase_url)) | 135 if (!handler->MatchesURL(lowercase_url)) |
| 136 continue; | 136 continue; |
| 137 // Filter out Files app from handling ZIP files via a handler, as it's | 137 // Filter out Files app from handling ZIP files via a handler, as it's |
| 138 // now handled by new ZIP unpacker extension based on File System Provider | 138 // now handled by new ZIP unpacker extension based on File System Provider |
| 139 // API. | 139 // API. |
| 140 const URLPattern zip_pattern(URLPattern::SCHEME_EXTENSION, | 140 const URLPattern zip_pattern(URLPattern::SCHEME_EXTENSION, |
| 141 "chrome-extension://*/*.zip"); | 141 "chrome-extension://*/*.zip"); |
| 142 if (handler->extension_id() == kFileManagerAppId && | 142 if (handler->extension_id() == kFileManagerAppId && |
| 143 zip_pattern.MatchesURL(selected_file_url) && | 143 zip_pattern.MatchesURL(selected_file_url) && |
| 144 !CommandLine::ForCurrentProcess()->HasSwitch( | 144 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 145 chromeos::switches::kDisableNewZIPUnpacker)) { | 145 chromeos::switches::kDisableNewZIPUnpacker)) { |
| 146 continue; | 146 continue; |
| 147 } | 147 } |
| 148 results.push_back(handler); | 148 results.push_back(handler); |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 return results; | 151 return results; |
| 152 } | 152 } |
| 153 | 153 |
| 154 // This class is used to execute a file browser handler task. Here's how this | 154 // This class is used to execute a file browser handler task. Here's how this |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 if (common_handlers.empty()) | 529 if (common_handlers.empty()) |
| 530 return FileBrowserHandlerList(); | 530 return FileBrowserHandlerList(); |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 | 533 |
| 534 return common_handlers; | 534 return common_handlers; |
| 535 } | 535 } |
| 536 | 536 |
| 537 } // namespace file_browser_handlers | 537 } // namespace file_browser_handlers |
| 538 } // namespace file_manager | 538 } // namespace file_manager |
| OLD | NEW |