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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_controller_helper.cc

Issue 1960293003: Remove OS_CHROMEOS from ui/ash code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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/ui/ash/launcher/launcher_controller_helper.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
index b3156d128e9158b8f23f3dd4be0b12a0719ef93e..57e641abb2225ff51ef67aef7e996dbb4575fb1f 100644
--- a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
@@ -13,6 +13,8 @@
#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
+#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/extensions/app_launch_params.h"
#include "chrome/browser/ui/extensions/application_launch.h"
@@ -28,11 +30,6 @@
#include "net/base/url_util.h"
#include "ui/events/event_constants.h"
-#if defined(OS_CHROMEOS)
-#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
-#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
-#endif
-
namespace {
const extensions::Extension* GetExtensionForTab(Profile* profile,
@@ -109,7 +106,6 @@ base::string16 LauncherControllerHelper::GetAppTitle(
if (app_id.empty())
return title;
-#if defined(OS_CHROMEOS)
// Get title if the app is an Arc app.
ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile);
DCHECK(arc_prefs);
@@ -121,7 +117,6 @@ base::string16 LauncherControllerHelper::GetAppTitle(
title = base::UTF8ToUTF16(app_info->name);
return title;
}
-#endif // defined(OS_CHROMEOS)
const extensions::Extension* extension = GetExtensionByID(profile, app_id);
if (extension)
@@ -149,10 +144,8 @@ std::string LauncherControllerHelper::GetAppID(content::WebContents* tab) {
}
bool LauncherControllerHelper::IsValidIDForCurrentUser(const std::string& id) {
-#if defined(OS_CHROMEOS)
if (ArcAppListPrefs::Get(profile_)->IsRegistered(id))
return true;
-#endif
return GetExtensionByID(profile_, id) != nullptr;
}
@@ -163,12 +156,10 @@ void LauncherControllerHelper::SetCurrentUser(Profile* profile) {
void LauncherControllerHelper::LaunchApp(const std::string& app_id,
ash::LaunchSource source,
int event_flags) {
-#if defined(OS_CHROMEOS)
if (ArcAppListPrefs::Get(profile_)->IsRegistered(app_id)) {
arc::LaunchApp(profile_, app_id);
return;
}
-#endif
// |extension| could be null when it is being unloaded for updating.
const extensions::Extension* extension = GetExtensionByID(profile_, app_id);

Powered by Google App Engine
This is Rietveld 408576698