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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 105733003: Move LaunchType out of ExtensionPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indenting 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 24f7026346a143078d7f80a78de9732142c287a5..f7f00014f9cfe456266024e7f33d8bd0b54a9d41 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
+#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_util.h"
@@ -154,8 +155,7 @@ void AppLauncherHandler::CreateAppInfo(
value->SetInteger("launch_container",
extensions::AppLaunchInfo::GetLaunchContainer(extension));
ExtensionPrefs* prefs = service->extension_prefs();
- value->SetInteger("launch_type",
- prefs->GetLaunchType(extension));
+ value->SetInteger("launch_type", extensions::GetLaunchType(prefs, extension));
value->SetBoolean("is_component",
extension->location() == extensions::Manifest::COMPONENT);
value->SetBoolean("is_webstore",
@@ -559,9 +559,10 @@ void AppLauncherHandler::HandleSetLaunchType(const ListValue* args) {
// Don't update the page; it already knows about the launch type change.
base::AutoReset<bool> auto_reset(&ignore_changes_, true);
- extension_service_->extension_prefs()->SetLaunchType(
+ extensions::SetLaunchType(
+ extension_service_->extension_prefs(),
extension_id,
- static_cast<ExtensionPrefs::LaunchType>(
+ static_cast<extensions::LaunchType>(
static_cast<int>(launch_type)));
}
« no previous file with comments | « chrome/browser/ui/views/app_list/win/app_list_controller_delegate_win.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698