OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "apps/app_launch_for_metro_restart_win.h" | 5 #include "apps/app_launch_for_metro_restart_win.h" |
6 | 6 |
7 #include "apps/pref_names.h" | 7 #include "apps/pref_names.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/time.h" | 12 #include "base/time/time.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/extensions/api/app_runtime/app_runtime_api.h" | 14 #include "chrome/browser/extensions/api/app_runtime/app_runtime_api.h" |
15 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
16 #include "chrome/browser/extensions/extension_system.h" | 16 #include "chrome/browser/extensions/extension_system.h" |
17 #include "chrome/browser/extensions/platform_app_launcher.h" | 17 #include "chrome/browser/extensions/platform_app_launcher.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/profiles/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
20 #include "win8/util/win8_util.h" | 20 #include "win8/util/win8_util.h" |
21 | 21 |
22 using extensions::Extension; | 22 using extensions::Extension; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 void SetAppLaunchForMetroRestart(Profile* profile, | 85 void SetAppLaunchForMetroRestart(Profile* profile, |
86 const std::string& extension_id) { | 86 const std::string& extension_id) { |
87 PrefService* prefs = g_browser_process->local_state(); | 87 PrefService* prefs = g_browser_process->local_state(); |
88 prefs->SetString(prefs::kAppLaunchForMetroRestartProfile, | 88 prefs->SetString(prefs::kAppLaunchForMetroRestartProfile, |
89 profile->GetPath().BaseName().MaybeAsASCII()); | 89 profile->GetPath().BaseName().MaybeAsASCII()); |
90 prefs->SetString(prefs::kAppLaunchForMetroRestart, extension_id); | 90 prefs->SetString(prefs::kAppLaunchForMetroRestart, extension_id); |
91 } | 91 } |
92 | 92 |
93 } // namespace apps | 93 } // namespace apps |
OLD | NEW |