diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 10:29:04 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 10:29:04 +0000 |
commit | af71d648c150826278086efb7a718a9da5728cde (patch) | |
tree | 14cbfdd65ac3d7ac0caaa583a0293d2abba2fbe8 /chrome/browser/shell_integration.h | |
parent | ceefd3dc54b0126bec1298a129b0ca4361e7ab7b (diff) | |
download | chromium_src-af71d648c150826278086efb7a718a9da5728cde.zip chromium_src-af71d648c150826278086efb7a718a9da5728cde.tar.gz chromium_src-af71d648c150826278086efb7a718a9da5728cde.tar.bz2 |
Add missing tests for Linux desktop shortcuts logic.
This also makes the code use EnvironmentVariableGetter
instead of calling getenv directly because we need the control
in tests.
This is a follow-up after http://codereview.chromium.org/607001
TEST=ShellIntegrationTest.GetDesktopShortcutTemplate
BUG=30785
Review URL: http://codereview.chromium.org/798002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration.h')
-rw-r--r-- | chrome/browser/shell_integration.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h index 96e1dea..42adfd6 100644 --- a/chrome/browser/shell_integration.h +++ b/chrome/browser/shell_integration.h @@ -15,6 +15,10 @@ class FilePath; +namespace base { +class EnvironmentVariableGetter; +} + class ShellIntegration { public: // Sets Chrome as default browser (only for current user). Returns false if @@ -69,7 +73,8 @@ class ShellIntegration { const string16& extension_app_id); #if defined(USE_X11) - static bool GetDesktopShortcutTemplate(std::string* output); + static bool GetDesktopShortcutTemplate( + base::EnvironmentVariableGetter* env_getter, std::string* output); // Returns filename for .desktop file based on |url|, sanitized for security. static FilePath GetDesktopShortcutFilename(const GURL& url); |