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

Unified Diff: chrome/browser/extensions/api/management/management_api.cc

Issue 332413003: Cleanup: Remove #ifdefs in extensions code that is disabled on mobile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/management/management_api.cc
diff --git a/chrome/browser/extensions/api/management/management_api.cc b/chrome/browser/extensions/api/management/management_api.cc
index b8f7c0673d4d6915e3ac76697d754777afb2dcd3..0a624dd873a2b10d352b52b222be393c57a3f176 100644
--- a/chrome/browser/extensions/api/management/management_api.cc
+++ b/chrome/browser/extensions/api/management/management_api.cc
@@ -30,6 +30,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
+#include "chrome/browser/ui/webui/ntp/core_app_launcher_handler.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/extensions/api/management.h"
@@ -54,10 +55,6 @@
#include "extensions/common/url_pattern.h"
#include "ui/gfx/favicon_size.h"
-#if !defined(OS_ANDROID)
-#include "chrome/browser/ui/webui/ntp/core_app_launcher_handler.h"
-#endif
-
using base::IntToString;
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -284,14 +281,14 @@ void AddExtensionInfo(const ExtensionSet& extensions,
}
}
-} // namespace
+} // namespace
ExtensionService* ManagementFunction::service() {
- return extensions::ExtensionSystem::Get(GetProfile())->extension_service();
+ return ExtensionSystem::Get(GetProfile())->extension_service();
}
ExtensionService* AsyncManagementFunction::service() {
- return extensions::ExtensionSystem::Get(GetProfile())->extension_service();
+ return ExtensionSystem::Get(GetProfile())->extension_service();
}
bool ManagementGetAllFunction::RunSync() {
@@ -504,11 +501,9 @@ bool ManagementLaunchAppFunction::RunSync() {
GetLaunchContainer(ExtensionPrefs::Get(GetProfile()), extension);
OpenApplication(AppLaunchParams(
GetProfile(), extension, launch_container, NEW_FOREGROUND_TAB));
-#if !defined(OS_ANDROID)
CoreAppLauncherHandler::RecordAppLaunchType(
extension_misc::APP_LAUNCH_EXTENSION_API,
extension->GetType());
-#endif
return true;
}
@@ -554,7 +549,7 @@ bool ManagementSetEnabledFunction::RunAsync() {
error_ = keys::kGestureNeededForEscalationError;
return false;
}
- AddRef(); // Matched in InstallUIProceed/InstallUIAbort
+ AddRef(); // Matched in InstallUIProceed/InstallUIAbort
install_prompt_.reset(
new ExtensionInstallPrompt(GetAssociatedWebContents()));
install_prompt_->ConfirmReEnable(this, extension);
@@ -614,7 +609,7 @@ bool ManagementUninstallFunctionBase::Uninstall(
if (auto_confirm_for_test == DO_NOT_SKIP) {
if (show_confirm_dialog) {
- AddRef(); // Balanced in ExtensionUninstallAccepted/Canceled
+ AddRef(); // Balanced in ExtensionUninstallAccepted/Canceled
extension_uninstall_dialog_.reset(ExtensionUninstallDialog::Create(
GetProfile(), GetCurrentBrowser(), this));
if (extension_id() != target_extension_id) {
« no previous file with comments | « chrome/browser/extensions/api/declarative/rules_registry_service.cc ('k') | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698