OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/shell_integration.h" | 5 #include "chrome/browser/shell_integration.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 new_cmd_line.AppendSwitchPath(switches::kUserDataDir, absolute_user_data_dir); | 107 new_cmd_line.AppendSwitchPath(switches::kUserDataDir, absolute_user_data_dir); |
108 | 108 |
109 #if defined(OS_CHROMEOS) | 109 #if defined(OS_CHROMEOS) |
110 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); | 110 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); |
111 FilePath profile = cmd_line.GetSwitchValuePath(switches::kLoginProfile); | 111 FilePath profile = cmd_line.GetSwitchValuePath(switches::kLoginProfile); |
112 if (!profile.empty()) | 112 if (!profile.empty()) |
113 new_cmd_line.AppendSwitchPath(switches::kLoginProfile, profile); | 113 new_cmd_line.AppendSwitchPath(switches::kLoginProfile, profile); |
114 #endif | 114 #endif |
115 | 115 |
116 new_cmd_line.AppendSwitchASCII(switches::kAppId, extension_app_id); | 116 new_cmd_line.AppendSwitchASCII(switches::kAppId, extension_app_id); |
| 117 new_cmd_line.AppendSwitch(switches::kEnablePlatformApps); |
117 | 118 |
118 // Convert path to absolute and ensure it exists. | 119 // Convert path to absolute and ensure it exists. |
119 FilePath absolute_extension_path(extension_path); | 120 FilePath absolute_extension_path(extension_path); |
120 DCHECK(file_util::AbsolutePath(&absolute_extension_path) && | 121 DCHECK(file_util::AbsolutePath(&absolute_extension_path) && |
121 file_util::PathExists(absolute_extension_path)); | 122 file_util::PathExists(absolute_extension_path)); |
122 // TODO(sail): Use a different flag that doesn't imply Location::LOAD for the | 123 // TODO(sail): Use a different flag that doesn't imply Location::LOAD for the |
123 // extension. | 124 // extension. |
124 new_cmd_line.AppendSwitchPath(switches::kLoadExtension, | 125 new_cmd_line.AppendSwitchPath(switches::kLoadExtension, |
125 absolute_extension_path); | 126 absolute_extension_path); |
126 | 127 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // DefaultProtocolClientWorker, private: | 256 // DefaultProtocolClientWorker, private: |
256 | 257 |
257 ShellIntegration::DefaultWebClientState | 258 ShellIntegration::DefaultWebClientState |
258 ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() { | 259 ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() { |
259 return ShellIntegration::IsDefaultProtocolClient(protocol_); | 260 return ShellIntegration::IsDefaultProtocolClient(protocol_); |
260 } | 261 } |
261 | 262 |
262 void ShellIntegration::DefaultProtocolClientWorker::SetAsDefault() { | 263 void ShellIntegration::DefaultProtocolClientWorker::SetAsDefault() { |
263 ShellIntegration::SetAsDefaultProtocolClient(protocol_); | 264 ShellIntegration::SetAsDefaultProtocolClient(protocol_); |
264 } | 265 } |
OLD | NEW |