Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: chrome/browser/chromeos/file_manager/file_browser_handlers.cc

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move ExtensionSet to extensions namespace Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 extensions::ExtensionSystem::Get(profile)->extension_service(); 94 extensions::ExtensionSystem::Get(profile)->extension_service();
95 // In unit-tests, we may not have an ExtensionService. 95 // In unit-tests, we may not have an ExtensionService.
96 if (!service) 96 if (!service)
97 return FileBrowserHandlerList(); 97 return FileBrowserHandlerList();
98 98
99 // We need case-insensitive matching, and pattern in the handler is already 99 // We need case-insensitive matching, and pattern in the handler is already
100 // in lower case. 100 // in lower case.
101 const GURL lowercase_url(EscapedUtf8ToLower(selected_file_url.spec())); 101 const GURL lowercase_url(EscapedUtf8ToLower(selected_file_url.spec()));
102 102
103 FileBrowserHandlerList results; 103 FileBrowserHandlerList results;
104 for (ExtensionSet::const_iterator iter = service->extensions()->begin(); 104 for (extensions::ExtensionSet::const_iterator iter =
105 iter != service->extensions()->end(); 105 service->extensions()->begin();
106 ++iter) { 106 iter != service->extensions()->end(); ++iter) {
107 const Extension* extension = iter->get(); 107 const Extension* extension = iter->get();
108 if (profile->IsOffTheRecord() && 108 if (profile->IsOffTheRecord() &&
109 !extension_util::IsIncognitoEnabled(extension->id(), service)) 109 !extension_util::IsIncognitoEnabled(extension->id(), service))
110 continue; 110 continue;
111 111
112 FileBrowserHandler::List* handler_list = 112 FileBrowserHandler::List* handler_list =
113 FileBrowserHandler::GetHandlers(extension); 113 FileBrowserHandler::GetHandlers(extension);
114 if (!handler_list) 114 if (!handler_list)
115 continue; 115 continue;
116 for (FileBrowserHandler::List::const_iterator handler_iter = 116 for (FileBrowserHandler::List::const_iterator handler_iter =
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698