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

Side by Side Diff: chrome/browser/extensions/extension_file_browser_private_api.cc

Issue 8789018: Revert 113047 - Make ExtensionService use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extension_file_browser_private_api.h" 5 #include "chrome/browser/extensions/extension_file_browser_private_api.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 return base::StringPrintf("%s|%s", extension_id, action_id); 123 return base::StringPrintf("%s|%s", extension_id, action_id);
124 } 124 }
125 125
126 bool GetFileBrowserHandlers(Profile* profile, 126 bool GetFileBrowserHandlers(Profile* profile,
127 const GURL& selected_file_url, 127 const GURL& selected_file_url,
128 ActionSet* results) { 128 ActionSet* results) {
129 ExtensionService* service = profile->GetExtensionService(); 129 ExtensionService* service = profile->GetExtensionService();
130 if (!service) 130 if (!service)
131 return false; // In unit-tests, we may not have an ExtensionService. 131 return false; // In unit-tests, we may not have an ExtensionService.
132 132
133 for (ExtensionSet::const_iterator iter = service->extensions()->begin(); 133 for (ExtensionList::const_iterator iter = service->extensions()->begin();
134 iter != service->extensions()->end(); 134 iter != service->extensions()->end();
135 ++iter) { 135 ++iter) {
136 const Extension* extension = *iter; 136 const Extension* extension = iter->get();
137 if (!extension->file_browser_handlers()) 137 if (!extension->file_browser_handlers())
138 continue; 138 continue;
139 139
140 for (Extension::FileBrowserHandlerList::const_iterator action_iter = 140 for (Extension::FileBrowserHandlerList::const_iterator action_iter =
141 extension->file_browser_handlers()->begin(); 141 extension->file_browser_handlers()->begin();
142 action_iter != extension->file_browser_handlers()->end(); 142 action_iter != extension->file_browser_handlers()->end();
143 ++action_iter) { 143 ++action_iter) {
144 const FileBrowserHandler* action = action_iter->get(); 144 const FileBrowserHandler* action = action_iter->get();
145 if (!action->MatchesURL(selected_file_url)) 145 if (!action->MatchesURL(selected_file_url))
146 continue; 146 continue;
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON)); 1684 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON));
1685 dict->SetString("PLAY_MEDIA", 1685 dict->SetString("PLAY_MEDIA",
1686 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); 1686 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY));
1687 #if defined(OS_CHROMEOS) 1687 #if defined(OS_CHROMEOS)
1688 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePhotoEditor)) 1688 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePhotoEditor))
1689 dict->SetString("ENABLE_PHOTO_EDITOR", "true"); 1689 dict->SetString("ENABLE_PHOTO_EDITOR", "true");
1690 #endif 1690 #endif
1691 1691
1692 return true; 1692 return true;
1693 } 1693 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_crash_recovery_browsertest.cc ('k') | chrome/browser/extensions/extension_info_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698