summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 23:16:39 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 23:16:39 +0000
commit141c26dd8d4fea199546db1cb7b3c6644fff0e06 (patch)
tree3f6faec7cc978241322807d6fa46462380fe2605 /chrome_frame/chrome_frame_automation.cc
parent1522387612c182c053c952dd2764c4d417ba87d9 (diff)
downloadchromium_src-141c26dd8d4fea199546db1cb7b3c6644fff0e06.zip
chromium_src-141c26dd8d4fea199546db1cb7b3c6644fff0e06.tar.gz
chromium_src-141c26dd8d4fea199546db1cb7b3c6644fff0e06.tar.bz2
Reverting this CL to see if this fixes chrome frame unit test failures.
Revert 42684 - Implements IDeleteBrowsing history and moves the GCF profile into the IE TIF directory for nonpriv mode users on IE < 8. Implementation notes: Earlier work enabled InPrivate browsing detection and mapped it to creation of an incognito profile instance.Privacy features and how they operate with this change: "Delete Browsing History": IE 6 & 7: all history (including databases) is deleted if cache is cleared *WITHOUT* an active Chrome process holding references to the profile resources. If GCF is rendering a page when the cache is cleared, history *WILL NOT* be deleted on the GCF side, however GCF will continue to operate and IE will remove all other history artifacts as usual. IE 8: GCF cache is cleared in alignment with the options specified by the user. Clearing Temporary Internet Files may destroy the profile entirely, and so we need to consider not moving the GCF profile on IE 8. "InPrivate Filtering": IE 8 (only): more testing required. "InPrivate Browsing": IE 8 (only): pages rendered in GCF *after* entering InPrivate mode are not persisted to disk (use an incognito wrapper on the specified profile). Currently displayed pages are not effected by the switch, although refreshing them will invoke the new behavior. Generally speaking, BHO's are disabled by IE 8 while in InPrivate mode, so entering this state is wonky to begin with but we handle it as well as can be expected. BUG=22846 TEST=On IE 8, clear the cache entirely, note GCF entries in DbgView (better tests coming) Review URL: http://codereview.chromium.org/858003 TBR=slightlyoff@chromium.org Review URL: http://codereview.chromium.org/1353002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc36
1 files changed, 24 insertions, 12 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index 8c1fb45..2c5d238 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -19,6 +19,8 @@
#include "base/waitable_event.h"
#include "chrome/app/client_util.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome_frame/chrome_launcher.h"
@@ -269,9 +271,20 @@ void ProxyFactory::CreateProxy(ProxyFactory::ProxyCacheEntry* entry,
if (IsHeadlessMode())
command_line->AppendSwitch(switches::kFullMemoryCrashReport);
- DLOG(INFO) << "Profile path: " << params.profile_path.value();
- command_line->AppendSwitchWithValue(switches::kUserDataDir,
- params.profile_path.value());
+ // Place the profile directory in
+ // "<chrome_exe_path>\..\User Data\<profile-name>"
+ if (!entry->profile_name.empty()) {
+ FilePath profile_path;
+ if (chrome::GetChromeFrameUserDataDirectory(&profile_path)) {
+ profile_path = profile_path.Append(entry->profile_name);
+ command_line->AppendSwitchWithValue(switches::kUserDataDir,
+ profile_path.value());
+ } else {
+ // Can't get the profile dir :-( We need one to work, so fail.
+ // We have no code for launch failure.
+ entry->launch_result = AutomationLaunchResult(-1);
+ }
+ }
std::wstring command_line_string(command_line->command_line_string());
// If there are any extra arguments, append them to the command line.
@@ -326,6 +339,8 @@ void ProxyFactory::CreateProxy(ProxyFactory::ProxyCacheEntry* entry,
}
bool ProxyFactory::ReleaseAutomationServer(void* server_id) {
+ DLOG(INFO) << __FUNCTION__;
+
if (!server_id) {
NOTREACHED();
return false;
@@ -442,7 +457,7 @@ bool ChromeFrameAutomationClient::Initialize(
ChromeFrameDelegate* chrome_frame_delegate,
int automation_server_launch_timeout,
bool perform_version_check,
- const FilePath& profile_path,
+ const std::wstring& profile_name,
const std::wstring& extra_chrome_arguments,
bool incognito) {
DCHECK(!IsWindow());
@@ -482,8 +497,7 @@ bool ChromeFrameAutomationClient::Initialize(
chrome_launch_params_.automation_server_launch_timeout =
automation_server_launch_timeout;
- chrome_launch_params_.profile_path = profile_path;
- chrome_launch_params_.profile_name = profile_path.BaseName().value();
+ chrome_launch_params_.profile_name = profile_name;
chrome_launch_params_.extra_chrome_arguments = extra_chrome_arguments;
chrome_launch_params_.perform_version_check = perform_version_check;
chrome_launch_params_.url = navigate_after_initialization_ ? GURL() : url_;
@@ -497,6 +511,8 @@ bool ChromeFrameAutomationClient::Initialize(
}
void ChromeFrameAutomationClient::Uninitialize() {
+ DLOG(INFO) << __FUNCTION__;
+
if (init_state_ == UNINITIALIZED) {
DLOG(WARNING) << __FUNCTION__ << ": Automation client not initialized";
return;
@@ -914,7 +930,6 @@ void ChromeFrameAutomationClient::LaunchComplete(
NULL, NULL, NULL);
automation_server_->SendAsAsync(message, NewCallback(this,
&ChromeFrameAutomationClient::CreateExternalTabComplete), this);
- DLOG(INFO) << __FUNCTION__ << ": sending CreateExternalTabComplete";
}
}
} else {
@@ -1084,6 +1099,7 @@ void ChromeFrameAutomationClient::SetParentWindow(HWND parent_window) {
}
void ChromeFrameAutomationClient::ReleaseAutomationServer() {
+ DLOG(INFO) << __FUNCTION__;
if (automation_server_id_) {
// Cache the server id and clear the automation_server_id_ before
// calling ReleaseAutomationServer. The reason we do this is that
@@ -1201,10 +1217,6 @@ void ChromeFrameAutomationClient::SetPageFontSize(
new AutomationMsg_SetPageFontSize(0, tab_handle_, font_size));
}
-void ChromeFrameAutomationClient::RemoveBrowsingData(int remove_mask) {
- automation_server_->Send(
- new AutomationMsg_RemoveBrowsingData(0, remove_mask));
-}
//////////////////////////////////////////////////////////////////////////
// PluginUrlRequestDelegate implementation.