| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <windows.h> | 7 #include <windows.h> |
| 8 #include <shobjidl.h> | 8 #include <shobjidl.h> |
| 9 #include <propkey.h> | 9 #include <propkey.h> |
| 10 #include <propvarutil.h> | 10 #include <propvarutil.h> |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 295 } |
| 296 // When we check for default browser we don't necessarily want to count file | 296 // When we check for default browser we don't necessarily want to count file |
| 297 // type handlers and icons as having changed the default browser status, | 297 // type handlers and icons as having changed the default browser status, |
| 298 // since the user may have changed their shell settings to cause HTML files | 298 // since the user may have changed their shell settings to cause HTML files |
| 299 // to open with a text editor for example. We also don't want to aggressively | 299 // to open with a text editor for example. We also don't want to aggressively |
| 300 // claim FTP, since the user may have a separate FTP client. It is an open | 300 // claim FTP, since the user may have a separate FTP client. It is an open |
| 301 // question as to how to "heal" these settings. Perhaps the user should just | 301 // question as to how to "heal" these settings. Perhaps the user should just |
| 302 // re-run the installer or run with the --set-default-browser command line | 302 // re-run the installer or run with the --set-default-browser command line |
| 303 // flag. There is doubtless some other key we can hook into to cause "Repair" | 303 // flag. There is doubtless some other key we can hook into to cause "Repair" |
| 304 // to show up in Add/Remove programs for us. | 304 // to show up in Add/Remove programs for us. |
| 305 const std::wstring kChromeProtocols[] = {L"http", L"https"}; | 305 const std::wstring kChromeProtocols[] = {L"http", L"https", L"httpsv"}; |
| 306 | 306 |
| 307 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { | 307 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { |
| 308 IApplicationAssociationRegistration* pAAR; | 308 IApplicationAssociationRegistration* pAAR; |
| 309 HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration, | 309 HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration, |
| 310 NULL, CLSCTX_INPROC, __uuidof(IApplicationAssociationRegistration), | 310 NULL, CLSCTX_INPROC, __uuidof(IApplicationAssociationRegistration), |
| 311 (void**)&pAAR); | 311 (void**)&pAAR); |
| 312 if (!SUCCEEDED(hr)) | 312 if (!SUCCEEDED(hr)) |
| 313 return NOT_DEFAULT_BROWSER; | 313 return NOT_DEFAULT_BROWSER; |
| 314 | 314 |
| 315 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 315 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 profile_path); | 412 profile_path); |
| 413 } | 413 } |
| 414 | 414 |
| 415 void ShellIntegration::MigrateChromiumShortcuts() { | 415 void ShellIntegration::MigrateChromiumShortcuts() { |
| 416 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 416 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
| 417 return; | 417 return; |
| 418 | 418 |
| 419 BrowserThread::PostTask( | 419 BrowserThread::PostTask( |
| 420 BrowserThread::FILE, FROM_HERE, new MigrateChromiumShortcutsTask()); | 420 BrowserThread::FILE, FROM_HERE, new MigrateChromiumShortcutsTask()); |
| 421 } | 421 } |
| OLD | NEW |