Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10413072: Teaching BrowsingDataRemover how to delete application data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Inadvertant include. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 3572 matching lines...) Expand 10 before | Expand all | Expand 10 after
3583 3583
3584 if (!ContainsKey(string_to_time_period, time_period)) { 3584 if (!ContainsKey(string_to_time_period, time_period)) {
3585 AutomationJSONReply(this, reply_message) 3585 AutomationJSONReply(this, reply_message)
3586 .SendError("Invalid string for time_period."); 3586 .SendError("Invalid string for time_period.");
3587 return; 3587 return;
3588 } 3588 }
3589 3589
3590 BrowsingDataRemover* remover = new BrowsingDataRemover( 3590 BrowsingDataRemover* remover = new BrowsingDataRemover(
3591 profile(), string_to_time_period[time_period], base::Time()); 3591 profile(), string_to_time_period[time_period], base::Time());
3592 3592
3593 bool include_protected_origins = false;
3593 remover->AddObserver( 3594 remover->AddObserver(
3594 new AutomationProviderBrowsingDataObserver(this, reply_message)); 3595 new AutomationProviderBrowsingDataObserver(this, reply_message));
3595 remover->Remove(remove_mask); 3596 remover->Remove(remove_mask, include_protected_origins);
3596 // BrowsingDataRemover deletes itself using DeleteTask. 3597 // BrowsingDataRemover deletes itself using DeleteTask.
3597 // The observer also deletes itself after sending the reply. 3598 // The observer also deletes itself after sending the reply.
3598 } 3599 }
3599 3600
3600 namespace { 3601 namespace {
3601 3602
3602 // Get the TabContentsWrapper from a dictionary of arguments. 3603 // Get the TabContentsWrapper from a dictionary of arguments.
3603 TabContentsWrapper* GetTabContentsWrapperFromDict(const Browser* browser, 3604 TabContentsWrapper* GetTabContentsWrapperFromDict(const Browser* browser,
3604 const DictionaryValue* args, 3605 const DictionaryValue* args,
3605 std::string* error_message) { 3606 std::string* error_message) {
(...skipping 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after
6573 6574
6574 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( 6575 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle(
6575 IPC::Message* reply_message) { 6576 IPC::Message* reply_message) {
6576 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); 6577 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message);
6577 } 6578 }
6578 6579
6579 void TestingAutomationProvider::OnRemoveProvider() { 6580 void TestingAutomationProvider::OnRemoveProvider() {
6580 if (g_browser_process) 6581 if (g_browser_process)
6581 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6582 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6582 } 6583 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698