summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/automation')
-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
3 files changed, 16 insertions, 2 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;
}