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

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

Issue 680213003: Cleanup: Remove most enable_extensions logic in chrome/ extensions code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « chrome/browser/extensions/api/api_registration.gyp ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/saved_files_service.h" 8 #include "apps/saved_files_service.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 ExtensionPage(web_contents->GetURL(), 1476 ExtensionPage(web_contents->GetURL(),
1477 process->GetID(), 1477 process->GetID(),
1478 host->GetRoutingID(), 1478 host->GetRoutingID(),
1479 process->GetBrowserContext()->IsOffTheRecord(), 1479 process->GetBrowserContext()->IsOffTheRecord(),
1480 is_background_page && has_generated_background_page)); 1480 is_background_page && has_generated_background_page));
1481 } 1481 }
1482 } 1482 }
1483 1483
1484 ExtensionUninstallDialog* 1484 ExtensionUninstallDialog*
1485 ExtensionSettingsHandler::GetExtensionUninstallDialog() { 1485 ExtensionSettingsHandler::GetExtensionUninstallDialog() {
1486 #if !defined(OS_ANDROID)
1487 if (!extension_uninstall_dialog_.get()) { 1486 if (!extension_uninstall_dialog_.get()) {
1488 Browser* browser = chrome::FindBrowserWithWebContents( 1487 Browser* browser = chrome::FindBrowserWithWebContents(
1489 web_ui()->GetWebContents()); 1488 web_ui()->GetWebContents());
1490 extension_uninstall_dialog_.reset( 1489 extension_uninstall_dialog_.reset(
1491 ExtensionUninstallDialog::Create(extension_service_->profile(), 1490 ExtensionUninstallDialog::Create(extension_service_->profile(),
1492 browser->window()->GetNativeWindow(), 1491 browser->window()->GetNativeWindow(),
1493 this)); 1492 this));
1494 } 1493 }
1495 return extension_uninstall_dialog_.get(); 1494 return extension_uninstall_dialog_.get();
1496 #else
1497 return NULL;
1498 #endif // !defined(OS_ANDROID)
1499 } 1495 }
1500 1496
1501 void ExtensionSettingsHandler::OnReinstallComplete( 1497 void ExtensionSettingsHandler::OnReinstallComplete(
1502 bool success, 1498 bool success,
1503 const std::string& error, 1499 const std::string& error,
1504 webstore_install::Result result) { 1500 webstore_install::Result result) {
1505 MaybeUpdateAfterNotification(); 1501 MaybeUpdateAfterNotification();
1506 } 1502 }
1507 1503
1508 void ExtensionSettingsHandler::OnRequirementsChecked( 1504 void ExtensionSettingsHandler::OnRequirementsChecked(
1509 std::string extension_id, 1505 std::string extension_id,
1510 std::vector<std::string> requirement_errors) { 1506 std::vector<std::string> requirement_errors) {
1511 if (requirement_errors.empty()) { 1507 if (requirement_errors.empty()) {
1512 extension_service_->EnableExtension(extension_id); 1508 extension_service_->EnableExtension(extension_id);
1513 } else { 1509 } else {
1514 ExtensionErrorReporter::GetInstance()->ReportError( 1510 ExtensionErrorReporter::GetInstance()->ReportError(
1515 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), 1511 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')),
1516 true); // Be noisy. 1512 true); // Be noisy.
1517 } 1513 }
1518 requirements_checker_.reset(); 1514 requirements_checker_.reset();
1519 } 1515 }
1520 1516
1521 } // namespace extensions 1517 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/api_registration.gyp ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698