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

Side by Side Diff: chrome/browser/apps/app_launch_for_metro_restart_win.cc

Issue 2276293002: Revert of Add ARC++ specific fields to launch data for specific apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
« no previous file with comments | « apps/launcher.cc ('k') | chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/apps/app_launch_for_metro_restart_win.h" 5 #include "chrome/browser/apps/app_launch_for_metro_restart_win.h"
6 6
7 #include "apps/launcher.h" 7 #include "apps/launcher.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/location.h" 10 #include "base/location.h"
(...skipping 26 matching lines...) Expand all
37 ExtensionSystem::Get(profile)->extension_service(); 37 ExtensionSystem::Get(profile)->extension_service();
38 if (!extension_service) 38 if (!extension_service)
39 return; 39 return;
40 40
41 const Extension* extension = 41 const Extension* extension =
42 extension_service->GetExtensionById(extension_id, false); 42 extension_service->GetExtensionById(extension_id, false);
43 if (!extension) 43 if (!extension)
44 return; 44 return;
45 45
46 AppRuntimeEventRouter::DispatchOnLaunchedEvent( 46 AppRuntimeEventRouter::DispatchOnLaunchedEvent(
47 profile, extension, extensions::SOURCE_RESTART, nullptr); 47 profile, extension, extensions::SOURCE_RESTART,
48 std::unique_ptr<extensions::api::app_runtime::ActionData>());
48 } 49 }
49 50
50 } // namespace 51 } // namespace
51 52
52 void HandleAppLaunchForMetroRestart(Profile* profile) { 53 void HandleAppLaunchForMetroRestart(Profile* profile) {
53 PrefService* prefs = g_browser_process->local_state(); 54 PrefService* prefs = g_browser_process->local_state();
54 if (!prefs->HasPrefPath(prefs::kAppLaunchForMetroRestartProfile)) 55 if (!prefs->HasPrefPath(prefs::kAppLaunchForMetroRestartProfile))
55 return; 56 return;
56 57
57 // This will be called for each profile that had a browser window open before 58 // This will be called for each profile that had a browser window open before
(...skipping 29 matching lines...) Expand all
87 profile->GetPath().BaseName().MaybeAsASCII()); 88 profile->GetPath().BaseName().MaybeAsASCII());
88 prefs->SetString(prefs::kAppLaunchForMetroRestart, extension_id); 89 prefs->SetString(prefs::kAppLaunchForMetroRestart, extension_id);
89 } 90 }
90 91
91 void RegisterPrefs(PrefRegistrySimple* registry) { 92 void RegisterPrefs(PrefRegistrySimple* registry) {
92 registry->RegisterStringPref(prefs::kAppLaunchForMetroRestart, ""); 93 registry->RegisterStringPref(prefs::kAppLaunchForMetroRestart, "");
93 registry->RegisterStringPref(prefs::kAppLaunchForMetroRestartProfile, ""); 94 registry->RegisterStringPref(prefs::kAppLaunchForMetroRestartProfile, "");
94 } 95 }
95 96
96 } // namespace app_metro_launch 97 } // namespace app_metro_launch
OLDNEW
« no previous file with comments | « apps/launcher.cc ('k') | chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698