Chromium Code Reviews| 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 <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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 418 dist, InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())), | 418 dist, InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())), |
| 419 profile_path); | 419 profile_path); |
| 420 } | 420 } |
| 421 | 421 |
| 422 string16 ShellIntegration::GetAppListAppModelIdForProfile( | 422 string16 ShellIntegration::GetAppListAppModelIdForProfile( |
| 423 const FilePath& profile_path) { | 423 const FilePath& profile_path) { |
| 424 return ShellIntegration::GetAppModelIdForProfile(kAppListAppName, | 424 return ShellIntegration::GetAppModelIdForProfile(kAppListAppName, |
| 425 profile_path); | 425 profile_path); |
| 426 } | 426 } |
| 427 | 427 |
| 428 string16 ShellIntegration::GetChromiumIconPath() { | 428 string16 ShellIntegration::GetChromiumIconPath() { |
|
gab
2012/11/14 18:47:32
Also rename this method to "...String" instead of
huangs
2012/11/14 20:35:55
Done, leading to new changes in the .h file and br
| |
| 429 // Determine the app path. If we can't determine what that is, we have | 429 // Determine the app path. If we can't determine what that is, we have |
| 430 // bigger fish to fry... | 430 // bigger fish to fry... |
| 431 FilePath app_path; | 431 FilePath app_path; |
|
gab
2012/11/14 18:47:32
s/app_path/chrome_exe
For consistency with how we
huangs
2012/11/14 20:35:55
Done.
| |
| 432 if (!PathService::Get(base::FILE_EXE, &app_path)) { | 432 if (!PathService::Get(base::FILE_EXE, &app_path)) { |
| 433 NOTREACHED(); | 433 NOTREACHED(); |
| 434 return string16(); | 434 return string16(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 string16 icon_path(app_path.value()); | 437 return ShellUtil::GetResourceString( |
| 438 icon_path.push_back(','); | 438 app_path.value(), BrowserDistribution::GetDistribution()->GetIconIndex()); |
| 439 icon_path += base::IntToString16( | |
| 440 BrowserDistribution::GetDistribution()->GetIconIndex()); | |
| 441 return icon_path; | |
| 442 } | 439 } |
| 443 | 440 |
| 444 void ShellIntegration::MigrateChromiumShortcuts() { | 441 void ShellIntegration::MigrateChromiumShortcuts() { |
| 445 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 442 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
| 446 return; | 443 return; |
| 447 | 444 |
| 448 BrowserThread::PostTask( | 445 BrowserThread::PostTask( |
| 449 BrowserThread::FILE, FROM_HERE, | 446 BrowserThread::FILE, FROM_HERE, |
| 450 base::Bind(&MigrateChromiumShortcutsCallback)); | 447 base::Bind(&MigrateChromiumShortcutsCallback)); |
| 451 } | 448 } |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 470 } | 467 } |
| 471 | 468 |
| 472 shortcut = shortcut.Append(shortcut_name).Append(shortcut_name + | 469 shortcut = shortcut.Append(shortcut_name).Append(shortcut_name + |
| 473 installer::kLnkExt); | 470 installer::kLnkExt); |
| 474 if (file_util::PathExists(shortcut)) | 471 if (file_util::PathExists(shortcut)) |
| 475 return shortcut; | 472 return shortcut; |
| 476 } | 473 } |
| 477 | 474 |
| 478 return FilePath(); | 475 return FilePath(); |
| 479 } | 476 } |
| OLD | NEW |