summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 04:16:20 +0000
committerslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 04:16:20 +0000
commitbc73b4e541f57b44ac4c53df2589d91549f27eaf (patch)
tree47cf0721b0f9d9cd0a9c83196d4091120300f3a4 /chrome
parent46215d5ef32784db5544fc5f7ba06b6617935fec (diff)
downloadchromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.zip
chromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.tar.gz
chromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.tar.bz2
3rd try. *sigh*
See: http://codereview.chromium.org/858003 TBR=tommi BUG=22846 TEST=On IE 8, clear the cache entirely, watch GCF launch (via task manager) Review URL: http://codereview.chromium.org/1343004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/automation/automation_provider.cc10
-rw-r--r--chrome/browser/automation/automation_provider.h3
-rw-r--r--chrome/browser/automation/chrome_frame_automation_provider.cc5
-rw-r--r--chrome/test/automation/automation_messages_internal.h8
4 files changed, 23 insertions, 3 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 5dd3743..226f89c 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -33,6 +33,7 @@
#include "chrome/browser/bookmarks/bookmark_storage.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_window.h"
+#include "chrome/browser/browsing_data_remover.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/dom_operation_notification_details.h"
#include "chrome/browser/debugger/devtools_manager.h"
@@ -506,6 +507,7 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WaitForPopupMenuToOpen,
WaitForPopupMenuToOpen)
#endif
+ IPC_MESSAGE_HANDLER(AutomationMsg_RemoveBrowsingData, RemoveBrowsingData)
IPC_END_MESSAGE_MAP()
}
@@ -2349,6 +2351,14 @@ void AutomationProvider::OnSetPageFontSize(int tab_handle,
}
}
+void AutomationProvider::RemoveBrowsingData(int remove_mask) {
+ BrowsingDataRemover* remover;
+ remover = new BrowsingDataRemover(profile(),
+ BrowsingDataRemover::EVERYTHING, // All time periods.
+ base::Time());
+ remover->Remove(remove_mask);
+ // BrowsingDataRemover deletes itself.
+}
void AutomationProvider::WaitForBrowserWindowCountToBecome(
int target_count, IPC::Message* reply_message) {
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index 2328606..2d680b1 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -359,6 +359,9 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
void OnSetPageFontSize(int tab_handle, int font_size);
+ // See browsing_data_remover.h for explanation of bitmap fields.
+ void RemoveBrowsingData(int remove_mask);
+
void InstallExtension(const FilePath& crx_path,
IPC::Message* reply_message);
diff --git a/chrome/browser/automation/chrome_frame_automation_provider.cc b/chrome/browser/automation/chrome_frame_automation_provider.cc
index c8bada3..9aa403d 100644
--- a/chrome/browser/automation/chrome_frame_automation_provider.cc
+++ b/chrome/browser/automation/chrome_frame_automation_provider.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -62,7 +62,8 @@ bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) {
case AutomationMsg_RequestStarted::ID:
case AutomationMsg_RequestData::ID:
case AutomationMsg_RequestEnd::ID:
- case AutomationMsg_SaveAsAsync::ID: {
+ case AutomationMsg_SaveAsAsync::ID:
+ case AutomationMsg_RemoveBrowsingData::ID: {
is_valid_message = true;
break;
}
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index 0e82155..bf3eb9b 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -1307,4 +1307,10 @@ IPC_BEGIN_MESSAGES(Automation)
IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForPopupMenuToOpen,
bool /* success */)
+ // This message informs the browser process to remove the history entries
+ // for the specified types across all time ranges. See
+ // browsing_data_remover.h for a list of REMOVE_* types supported in the
+ // remove_mask parameter.
+ IPC_MESSAGE_ROUTED1(AutomationMsg_RemoveBrowsingData, int)
+
IPC_END_MESSAGES(Automation)