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

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

Issue 10806034: Ability to clear old history Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
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/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 DCHECK(tab->GetWebContents()->GetBrowserContext() != NULL); 668 DCHECK(tab->GetWebContents()->GetBrowserContext() != NULL);
669 Profile* profile = Profile::FromBrowserContext( 669 Profile* profile = Profile::FromBrowserContext(
670 tab->GetWebContents()->GetBrowserContext()); 670 tab->GetWebContents()->GetBrowserContext());
671 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size); 671 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size);
672 } 672 }
673 } 673 }
674 } 674 }
675 675
676 void AutomationProvider::RemoveBrowsingData(int remove_mask) { 676 void AutomationProvider::RemoveBrowsingData(int remove_mask) {
677 BrowsingDataRemover* remover; 677 BrowsingDataRemover* remover;
678 remover = new BrowsingDataRemover(profile(), 678 remover = new BrowsingDataRemover(profile(), BrowsingDataRemover::EVERYTHING);
679 BrowsingDataRemover::EVERYTHING, // All time periods.
680 base::Time());
681 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB); 679 remover->Remove(remove_mask, BrowsingDataHelper::UNPROTECTED_WEB);
682 // BrowsingDataRemover deletes itself. 680 // BrowsingDataRemover deletes itself.
683 } 681 }
684 682
685 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, 683 void AutomationProvider::JavaScriptStressTestControl(int tab_handle,
686 int cmd, 684 int cmd,
687 int param) { 685 int param) {
688 RenderViewHost* view = GetViewForTab(tab_handle); 686 RenderViewHost* view = GetViewForTab(tab_handle);
689 if (!view) { 687 if (!view) {
690 NOTREACHED(); 688 NOTREACHED();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 748
751 return NULL; 749 return NULL;
752 } 750 }
753 751
754 void AutomationProvider::SaveAsAsync(int tab_handle) { 752 void AutomationProvider::SaveAsAsync(int tab_handle) {
755 NavigationController* tab = NULL; 753 NavigationController* tab = NULL;
756 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 754 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
757 if (web_contents) 755 if (web_contents)
758 web_contents->OnSavePage(); 756 web_contents->OnSavePage();
759 } 757 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698