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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 handler_list->begin(); | 72 handler_list->begin(); |
73 handler_iter != handler_list->end(); | 73 handler_iter != handler_list->end(); |
74 ++handler_iter) { | 74 ++handler_iter) { |
75 if (handler_iter->get()->id() == action_id) | 75 if (handler_iter->get()->id() == action_id) |
76 return handler_iter->get(); | 76 return handler_iter->get(); |
77 } | 77 } |
78 return NULL; | 78 return NULL; |
79 } | 79 } |
80 | 80 |
81 std::string EscapedUtf8ToLower(const std::string& str) { | 81 std::string EscapedUtf8ToLower(const std::string& str) { |
82 string16 utf16 = UTF8ToUTF16( | 82 base::string16 utf16 = UTF8ToUTF16( |
83 net::UnescapeURLComponent(str, net::UnescapeRule::NORMAL)); | 83 net::UnescapeURLComponent(str, net::UnescapeRule::NORMAL)); |
84 return net::EscapeUrlEncodedData( | 84 return net::EscapeUrlEncodedData( |
85 UTF16ToUTF8(base::i18n::ToLower(utf16)), | 85 UTF16ToUTF8(base::i18n::ToLower(utf16)), |
86 false /* do not replace space with plus */); | 86 false /* do not replace space with plus */); |
87 } | 87 } |
88 | 88 |
89 // Finds file browser handlers that can handle the |selected_file_url|. | 89 // Finds file browser handlers that can handle the |selected_file_url|. |
90 FileBrowserHandlerList FindFileBrowserHandlersForURL( | 90 FileBrowserHandlerList FindFileBrowserHandlersForURL( |
91 Profile* profile, | 91 Profile* profile, |
92 const GURL& selected_file_url) { | 92 const GURL& selected_file_url) { |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 common_handlers.erase(gallery_iter); | 539 common_handlers.erase(gallery_iter); |
540 else | 540 else |
541 common_handlers.erase(watch_iter); | 541 common_handlers.erase(watch_iter); |
542 } | 542 } |
543 | 543 |
544 return common_handlers; | 544 return common_handlers; |
545 } | 545 } |
546 | 546 |
547 } // namespace file_browser_handlers | 547 } // namespace file_browser_handlers |
548 } // namespace file_manager | 548 } // namespace file_manager |
OLD | NEW |