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

Side by Side Diff: chrome/browser/chromeos/login/session/stub_login_session_manager_delegate.cc

Issue 363613004: [cros] Define session_manager component with SessionManager base class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review + fix build Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/login/session/stub_login_session_manager_deleg ate.h"
6
7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/pref_names.h"
10
11 namespace chromeos {
12
13 StubLoginSessionManagerDelegate::StubLoginSessionManagerDelegate(
14 Profile* profile,
15 const std::string& login_user_id)
16 : RestoreAfterCrashSessionManagerDelegate(profile, login_user_id) {
17 }
18
19 StubLoginSessionManagerDelegate::~StubLoginSessionManagerDelegate() {
20 }
21
22 void StubLoginSessionManagerDelegate::Start() {
23 session_manager_->SetSessionState(
24 session_manager::SessionManager::SESSION_STATE_ACTIVE);
25
26 // For dev machines and stub user emulate as if sync has been initialized.
27 profile()->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
28 login_user_id());
29
30 RestoreAfterCrashSessionManagerDelegate::Start();
31 }
32
33 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698