OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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/profile_startup.h" | |
6 | |
7 #include "chrome/browser/chromeos/cros/cros_library.h" | |
8 #include "chrome/browser/chromeos/cros/network_library.h" | |
9 #include "chrome/browser/chromeos/customization_document.h" | |
10 #include "chrome/browser/chromeos/enterprise_extension_observer.h" | |
11 #include "chrome/browser/chromeos/sms_observer.h" | |
12 #include "chrome/browser/profiles/profile.h" | |
13 #include "chromeos/dbus/dbus_thread_manager.h" | |
14 | |
15 namespace chromeos { | |
16 | |
17 // TODO(beng): It is very fishy that any of these services need to be tied to | |
18 // a browser profile. This dependency should be severed and this | |
19 // init moved earlier in startup. | |
20 void ProfileStartup(Profile* profile, bool process_startup) { | |
21 // Initialize Chrome OS preferences like touch pad sensitivity. For the | |
22 // preferences to work in the guest mode, the initialization has to be | |
23 // done after |profile| is switched to the incognito profile (which | |
24 // is actually GuestSessionProfile in the guest mode). See the | |
25 // GetOffTheRecordProfile() call above. | |
26 profile->InitChromeOSPreferences(); | |
27 | |
28 if (process_startup) { | |
29 static chromeos::SmsObserver* sms_observer = | |
30 new chromeos::SmsObserver(profile); | |
31 chromeos::CrosLibrary::Get()->GetNetworkLibrary()-> | |
32 AddNetworkManagerObserver(sms_observer); | |
33 | |
34 profile->SetupChromeOSEnterpriseExtensionObserver(); | |
35 } | |
36 } | |
37 | |
38 } // namespace chromeos | |
OLD | NEW |