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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 314113010: Remove deprecated permissions functions from Extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months 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
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/ui/webui/extensions/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "apps/app_restore_service.h" 8 #include "apps/app_restore_service.h"
9 #include "apps/app_window.h" 9 #include "apps/app_window.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 ->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING); 1059 ->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING);
1060 if (!extension) 1060 if (!extension)
1061 return; 1061 return;
1062 1062
1063 if (!extension_id_prompting_.empty()) 1063 if (!extension_id_prompting_.empty())
1064 return; // Only one prompt at a time. 1064 return; // Only one prompt at a time.
1065 1065
1066 extension_id_prompting_ = extension->id(); 1066 extension_id_prompting_ = extension->id();
1067 prompt_.reset(new ExtensionInstallPrompt(web_contents())); 1067 prompt_.reset(new ExtensionInstallPrompt(web_contents()));
1068 std::vector<base::FilePath> retained_file_paths; 1068 std::vector<base::FilePath> retained_file_paths;
1069 if (extension->HasAPIPermission(APIPermission::kFileSystem)) { 1069 if (extension->permissions_data()->HasAPIPermission(
1070 APIPermission::kFileSystem)) {
1070 std::vector<apps::SavedFileEntry> retained_file_entries = 1071 std::vector<apps::SavedFileEntry> retained_file_entries =
1071 apps::SavedFilesService::Get(Profile::FromWebUI( 1072 apps::SavedFilesService::Get(Profile::FromWebUI(
1072 web_ui()))->GetAllFileEntries(extension_id_prompting_); 1073 web_ui()))->GetAllFileEntries(extension_id_prompting_);
1073 for (size_t i = 0; i < retained_file_entries.size(); ++i) { 1074 for (size_t i = 0; i < retained_file_entries.size(); ++i) {
1074 retained_file_paths.push_back(retained_file_entries[i].path); 1075 retained_file_paths.push_back(retained_file_entries[i].path);
1075 } 1076 }
1076 } 1077 }
1077 // The BrokerDelegate manages its own lifetime. 1078 // The BrokerDelegate manages its own lifetime.
1078 prompt_->ReviewPermissions( 1079 prompt_->ReviewPermissions(
1079 new BrokerDelegate(AsWeakPtr()), extension, retained_file_paths); 1080 new BrokerDelegate(AsWeakPtr()), extension, retained_file_paths);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 extension_service_->EnableExtension(extension_id); 1321 extension_service_->EnableExtension(extension_id);
1321 } else { 1322 } else {
1322 ExtensionErrorReporter::GetInstance()->ReportError( 1323 ExtensionErrorReporter::GetInstance()->ReportError(
1323 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), 1324 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')),
1324 true); // Be noisy. 1325 true); // Be noisy.
1325 } 1326 }
1326 requirements_checker_.reset(); 1327 requirements_checker_.reset();
1327 } 1328 }
1328 1329
1329 } // namespace extensions 1330 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698