| OLD | NEW |
| 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size); | 677 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size); |
| 678 } | 678 } |
| 679 } | 679 } |
| 680 } | 680 } |
| 681 | 681 |
| 682 void AutomationProvider::RemoveBrowsingData(int remove_mask) { | 682 void AutomationProvider::RemoveBrowsingData(int remove_mask) { |
| 683 BrowsingDataRemover* remover; | 683 BrowsingDataRemover* remover; |
| 684 remover = new BrowsingDataRemover(profile(), | 684 remover = new BrowsingDataRemover(profile(), |
| 685 BrowsingDataRemover::EVERYTHING, // All time periods. | 685 BrowsingDataRemover::EVERYTHING, // All time periods. |
| 686 base::Time()); | 686 base::Time()); |
| 687 remover->Remove(remove_mask); | 687 remover->Remove(remove_mask, BrowsingDataRemover::UNPROTECTED_WEB); |
| 688 // BrowsingDataRemover deletes itself. | 688 // BrowsingDataRemover deletes itself. |
| 689 } | 689 } |
| 690 | 690 |
| 691 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, | 691 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, |
| 692 int cmd, | 692 int cmd, |
| 693 int param) { | 693 int param) { |
| 694 RenderViewHost* view = GetViewForTab(tab_handle); | 694 RenderViewHost* view = GetViewForTab(tab_handle); |
| 695 if (!view) { | 695 if (!view) { |
| 696 NOTREACHED(); | 696 NOTREACHED(); |
| 697 return; | 697 return; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 | 756 |
| 757 return NULL; | 757 return NULL; |
| 758 } | 758 } |
| 759 | 759 |
| 760 void AutomationProvider::SaveAsAsync(int tab_handle) { | 760 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 761 NavigationController* tab = NULL; | 761 NavigationController* tab = NULL; |
| 762 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 762 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
| 763 if (web_contents) | 763 if (web_contents) |
| 764 web_contents->OnSavePage(); | 764 web_contents->OnSavePage(); |
| 765 } | 765 } |
| OLD | NEW |