| 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, |
| 688 BrowsingDataRemover::REMOVE_FROM_UNPROTECTED_ORIGINS); |
| 688 // BrowsingDataRemover deletes itself. | 689 // BrowsingDataRemover deletes itself. |
| 689 } | 690 } |
| 690 | 691 |
| 691 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, | 692 void AutomationProvider::JavaScriptStressTestControl(int tab_handle, |
| 692 int cmd, | 693 int cmd, |
| 693 int param) { | 694 int param) { |
| 694 RenderViewHost* view = GetViewForTab(tab_handle); | 695 RenderViewHost* view = GetViewForTab(tab_handle); |
| 695 if (!view) { | 696 if (!view) { |
| 696 NOTREACHED(); | 697 NOTREACHED(); |
| 697 return; | 698 return; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 | 757 |
| 757 return NULL; | 758 return NULL; |
| 758 } | 759 } |
| 759 | 760 |
| 760 void AutomationProvider::SaveAsAsync(int tab_handle) { | 761 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 761 NavigationController* tab = NULL; | 762 NavigationController* tab = NULL; |
| 762 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 763 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
| 763 if (web_contents) | 764 if (web_contents) |
| 764 web_contents->OnSavePage(); | 765 web_contents->OnSavePage(); |
| 765 } | 766 } |
| OLD | NEW |