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

Unified Diff: chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc

Issue 165173002: Style fixes for demo mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/chromeos/login/demo_mode/demo_app_launcher.cc
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc
index 6503d9b9708e6e0ddb8323af1301025991e6f7fa..e84706a8e04961ba82950eb09acd3237540e5776 100644
--- a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc
+++ b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc
@@ -5,15 +5,22 @@
#include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
#include "base/command_line.h"
+#include "base/files/file_path.h"
+#include "base/logging.h"
#include "chrome/browser/chromeos/app_mode/app_session_lifetime.h"
+#include "chrome/browser/chromeos/login/login_display_host.h"
#include "chrome/browser/chromeos/login/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/extensions/extension_constants.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/common/extension.h"
#include "grit/browser_resources.h"
+#include "ui/base/window_open_disposition.h"
namespace {
@@ -23,7 +30,7 @@ const char kDemoAppUserId[] = "demouser@demo.app.local";
namespace chromeos {
-DemoAppLauncher::DemoAppLauncher() : profile_(NULL) {}
+DemoAppLauncher::DemoAppLauncher() {}
DemoAppLauncher::~DemoAppLauncher() {}
@@ -37,19 +44,17 @@ void DemoAppLauncher::StartDemoAppLaunch() {
// static
bool DemoAppLauncher::IsDemoAppSession(const std::string& user_id) {
- return user_id == kDemoAppUserId ? true : false;
+ return (user_id == kDemoAppUserId);
bartfab (slow) 2014/02/17 15:53:58 Nit: The parentheses violate the style guide: htt
}
void DemoAppLauncher::OnProfileLoaded(Profile* profile) {
DVLOG(1) << "Profile loaded... Starting demo app launch.";
- profile_ = profile;
-
kiosk_profile_loader_.reset();
// Load our demo app, then launch it.
ExtensionService* extension_service =
- extensions::ExtensionSystem::Get(profile_)->extension_service();
- std::string extension_id = extension_service->component_loader()->Add(
+ extensions::ExtensionSystem::Get(profile)->extension_service();
+ const std::string extension_id = extension_service->component_loader()->Add(
IDR_DEMO_APP_MANIFEST,
base::FilePath("/usr/share/chromeos-assets/demo_app"));
@@ -61,8 +66,8 @@ void DemoAppLauncher::OnProfileLoaded(Profile* profile) {
command_line->AppendSwitchASCII(switches::kAppId, extension_id);
OpenApplication(AppLaunchParams(
- profile_, extension, extensions::LAUNCH_CONTAINER_WINDOW, NEW_WINDOW));
- InitAppSession(profile_, extension_id);
+ profile, extension, extensions::LAUNCH_CONTAINER_WINDOW, NEW_WINDOW));
+ InitAppSession(profile, extension_id);
UserManager::Get()->SessionStarted();

Powered by Google App Engine
This is Rietveld 408576698