diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-12 04:08:15 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-12 04:08:15 +0000 |
commit | 4458922b1e6d3b02a63bca68d0b286a5c36052ad (patch) | |
tree | 53d7d2571f04fc951c53f4b198d0c74fd4d8cab2 /chrome/browser/jumplist.cc | |
parent | a5fb1c5db00481df8e2707b1b1ef8ecd4d62559f (diff) | |
download | chromium_src-4458922b1e6d3b02a63bca68d0b286a5c36052ad.zip chromium_src-4458922b1e6d3b02a63bca68d0b286a5c36052ad.tar.gz chromium_src-4458922b1e6d3b02a63bca68d0b286a5c36052ad.tar.bz2 |
Fix Win7 issues for non-default profile:
- Fix case A reported by Satoshi.Matsuzaki where a 2nd icon is created
on launching chromium in non-default profile. This is because the
shortcuts for non-default profile is created with wrong app id. The
old use uses user data dir to generate the app id while the
GetChromiumAppId expects profile path;
- Fix an issue in jump list for non-default profile where the
recently close/most visted pages are always opened in the default
profile because the underlying shortcuts does not have the correct
user-data-dir arguments.
BUG=30414
TEST=Verify case A of Satoshi's comments @5 is fixed; Verify the jump list items are opened with correct profile;
Review URL: http://codereview.chromium.org/547011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/jumplist.cc')
-rw-r--r-- | chrome/browser/jumplist.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/jumplist.cc b/chrome/browser/jumplist.cc index 7456e35..e8d71d0 100644 --- a/chrome/browser/jumplist.cc +++ b/chrome/browser/jumplist.cc @@ -419,7 +419,13 @@ bool UpdateJumpList(const wchar_t* app_id, return false; // Retrieve the command-line switches of this process. - std::wstring chrome_switches; + CommandLine command_line(CommandLine::ARGUMENTS_ONLY); + std::wstring user_data_dir = CommandLine::ForCurrentProcess()-> + GetSwitchValue(switches::kUserDataDir); + if (!user_data_dir.empty()) + command_line.AppendSwitchWithValue(switches::kUserDataDir, user_data_dir); + + std::wstring chrome_switches = command_line.command_line_string(); // We allocate 60% of the given JumpList slots to "most-visited" items // and 40% to "recently-closed" items, respectively. |