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

Side by Side Diff: trunk/src/chrome/browser/chromeos/profiles/profile_helper.cc

Issue 14066013: Revert 194348 "Part of multiprofile implementation." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 (c) 2013 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/profiles/profile_helper.h"
6
7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/chromeos/cros/cros_library.h"
9 #include "chrome/browser/chromeos/cros/network_library.h"
10 #include "chrome/browser/chromeos/sms_observer.h"
11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_destroyer.h"
13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/common/chrome_constants.h"
15
16
17 namespace chromeos {
18
19 // static
20 Profile* ProfileHelper::GetSigninProfile() {
21 ProfileManager* profile_manager = g_browser_process->profile_manager();
22 base::FilePath user_data_dir = profile_manager->user_data_dir();
23 base::FilePath signin_profile_dir =
24 user_data_dir.AppendASCII(chrome::kInitialProfile);
25 return profile_manager->GetProfile(signin_profile_dir)->
26 GetOffTheRecordProfile();
27 }
28
29 // static
30 void ProfileHelper::ProfileStartup(Profile* profile, bool process_startup) {
31 // Initialize Chrome OS preferences like touch pad sensitivity. For the
32 // preferences to work in the guest mode, the initialization has to be
33 // done after |profile| is switched to the incognito profile (which
34 // is actually GuestSessionProfile in the guest mode). See the
35 // GetOffTheRecordProfile() call above.
36 profile->InitChromeOSPreferences();
37
38 if (process_startup) {
39 static chromeos::SmsObserver* sms_observer =
40 new chromeos::SmsObserver();
41 chromeos::CrosLibrary::Get()->GetNetworkLibrary()->
42 AddNetworkManagerObserver(sms_observer);
43
44 profile->SetupChromeOSEnterpriseExtensionObserver();
45 }
46 }
47
48 } // namespace chromeos
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/chromeos/profiles/profile_helper.h ('k') | trunk/src/chrome/browser/chromeos/sms_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698