| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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" |
| 6 |
| 5 #include <windows.h> | 7 #include <windows.h> |
| 6 #include <shlobj.h> | 8 #include <shlobj.h> |
| 7 #include <shobjidl.h> | 9 #include <shobjidl.h> |
| 8 | 10 |
| 9 #include "chrome/browser/shell_integration.h" | 11 #include "app/win_util.h" |
| 10 | |
| 11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 12 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 13 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 14 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 15 #include "base/registry.h" | 16 #include "base/registry.h" |
| 16 #include "base/string_util.h" | 17 #include "base/string_util.h" |
| 17 #include "base/task.h" | 18 #include "base/task.h" |
| 18 #include "base/win_util.h" | 19 #include "base/win_util.h" |
| 19 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
| 20 #include "chrome/common/win_util.h" | |
| 21 #include "chrome/installer/util/browser_distribution.h" | 21 #include "chrome/installer/util/browser_distribution.h" |
| 22 #include "chrome/installer/util/create_reg_key_work_item.h" | 22 #include "chrome/installer/util/create_reg_key_work_item.h" |
| 23 #include "chrome/installer/util/set_reg_value_work_item.h" | 23 #include "chrome/installer/util/set_reg_value_work_item.h" |
| 24 #include "chrome/installer/util/shell_util.h" | 24 #include "chrome/installer/util/shell_util.h" |
| 25 #include "chrome/installer/util/util_constants.h" | 25 #include "chrome/installer/util/util_constants.h" |
| 26 #include "chrome/installer/util/work_item.h" | 26 #include "chrome/installer/util/work_item.h" |
| 27 #include "chrome/installer/util/work_item_list.h" | 27 #include "chrome/installer/util/work_item_list.h" |
| 28 | 28 |
| 29 bool ShellIntegration::SetAsDefaultBrowser() { | 29 bool ShellIntegration::SetAsDefaultBrowser() { |
| 30 std::wstring chrome_exe; | 30 std::wstring chrome_exe; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 std::wstring key_path(L"http"); | 140 std::wstring key_path(L"http"); |
| 141 key_path.append(ShellUtil::kRegShellOpen); | 141 key_path.append(ShellUtil::kRegShellOpen); |
| 142 RegKey key(HKEY_CLASSES_ROOT, key_path.c_str(), KEY_READ); | 142 RegKey key(HKEY_CLASSES_ROOT, key_path.c_str(), KEY_READ); |
| 143 std::wstring app_cmd; | 143 std::wstring app_cmd; |
| 144 if (key.Valid() && key.ReadValue(L"", &app_cmd) && | 144 if (key.Valid() && key.ReadValue(L"", &app_cmd) && |
| 145 std::wstring::npos != StringToLowerASCII(app_cmd).find(L"firefox")) | 145 std::wstring::npos != StringToLowerASCII(app_cmd).find(L"firefox")) |
| 146 ff_default = true; | 146 ff_default = true; |
| 147 } | 147 } |
| 148 return ff_default; | 148 return ff_default; |
| 149 } | 149 } |
| OLD | NEW |