OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "content/browser/browser_thread.h" | 16 #include "content/browser/browser_thread.h" |
17 | 17 |
18 bool ShellIntegration::CanSetAsDefaultProtocolClient( | 18 bool ShellIntegration::CanSetAsDefaultProtocolClient() { |
19 const std::string& protocol) { | |
20 // Allowed as long as the browser can become the operating system default | 19 // Allowed as long as the browser can become the operating system default |
21 // browser. | 20 // browser. |
22 return CanSetAsDefaultBrowser(); | 21 return CanSetAsDefaultBrowser(); |
23 } | 22 } |
24 | 23 |
25 ShellIntegration::ShortcutInfo::ShortcutInfo() | 24 ShellIntegration::ShortcutInfo::ShortcutInfo() |
26 : create_on_desktop(false), | 25 : create_on_desktop(false), |
27 create_in_applications_menu(false), | 26 create_in_applications_menu(false), |
28 create_in_quick_launch_bar(false) { | 27 create_in_quick_launch_bar(false) { |
29 } | 28 } |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // DefaultProtocolClientWorker, private: | 189 // DefaultProtocolClientWorker, private: |
191 | 190 |
192 ShellIntegration::DefaultWebClientState | 191 ShellIntegration::DefaultWebClientState |
193 ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() { | 192 ShellIntegration::DefaultProtocolClientWorker::CheckIsDefault() { |
194 return ShellIntegration::IsDefaultProtocolClient(protocol_); | 193 return ShellIntegration::IsDefaultProtocolClient(protocol_); |
195 } | 194 } |
196 | 195 |
197 void ShellIntegration::DefaultProtocolClientWorker::SetAsDefault() { | 196 void ShellIntegration::DefaultProtocolClientWorker::SetAsDefault() { |
198 ShellIntegration::SetAsDefaultProtocolClient(protocol_); | 197 ShellIntegration::SetAsDefaultProtocolClient(protocol_); |
199 } | 198 } |
OLD | NEW |