summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_frame_plugin.h8
-rw-r--r--chrome_frame/utils.cc4
2 files changed, 10 insertions, 2 deletions
diff --git a/chrome_frame/chrome_frame_plugin.h b/chrome_frame/chrome_frame_plugin.h
index 9f3e0ac..de63b3c 100644
--- a/chrome_frame/chrome_frame_plugin.h
+++ b/chrome_frame/chrome_frame_plugin.h
@@ -15,7 +15,6 @@
#include "chrome/common/chrome_paths_internal.h"
#include "chrome_frame/simple_resource_loader.h"
#include "chrome_frame/utils.h"
-
#include "grit/chromium_strings.h"
#define IDC_ABOUT_CHROME_FRAME 40018
@@ -70,8 +69,13 @@ END_MSG_MAP()
bool incognito_mode = !is_privileged_ && incognito;
FilePath profile_path;
GetProfilePath(profile_name, &profile_path);
+ // The profile name could change based on the browser version. For e.g. for
+ // IE6/7 the profile is created in a different folder whose last component
+ // is Google Chrome Frame.
+ FilePath actual_profile_name = profile_path.BaseName();
launch_params_ = new ChromeFrameLaunchParams(url, referrer, profile_path,
- profile_name, extra_chrome_arguments, incognito_mode, is_widget_mode);
+ actual_profile_name.value(), extra_chrome_arguments, incognito_mode,
+ is_widget_mode);
return automation_client_->Initialize(this, launch_params_);
}
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc
index 26bab06..887d13d 100644
--- a/chrome_frame/utils.cc
+++ b/chrome_frame/utils.cc
@@ -34,6 +34,7 @@
#include "googleurl/src/url_canon.h"
#include "grit/chromium_strings.h"
+#include "net/base/escape.h"
#include "net/http/http_util.h"
// Note that these values are all lower case and are compared to
@@ -1358,6 +1359,9 @@ bool ChromeFrameUrl::ParseAttachExternalTabUrl() {
if (tokenizer.GetNext()) {
profile_name_ = tokenizer.token();
+ // Escape out special characters like %20, etc.
+ profile_name_ = UnescapeURLComponent(profile_name_,
+ UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS);
} else {
return false;
}