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

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

Issue 8879016: Add more per-tab preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CHECK -> DCHECK Created 8 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/browser_encoding_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 return; 723 return;
724 } 724 }
725 725
726 if (tab_tracker_->ContainsHandle(tab_handle)) { 726 if (tab_tracker_->ContainsHandle(tab_handle)) {
727 NavigationController* tab = tab_tracker_->GetResource(tab_handle); 727 NavigationController* tab = tab_tracker_->GetResource(tab_handle);
728 DCHECK(tab != NULL); 728 DCHECK(tab != NULL);
729 if (tab && tab->tab_contents()) { 729 if (tab && tab->tab_contents()) {
730 DCHECK(tab->tab_contents()->GetBrowserContext() != NULL); 730 DCHECK(tab->tab_contents()->GetBrowserContext() != NULL);
731 Profile* profile = 731 Profile* profile =
732 Profile::FromBrowserContext(tab->tab_contents()->GetBrowserContext()); 732 Profile::FromBrowserContext(tab->tab_contents()->GetBrowserContext());
733 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size); 733 profile->GetPrefs()->SetInteger(
734 prefs::kWebKitGlobalDefaultFontSize, font_size);
734 } 735 }
735 } 736 }
736 } 737 }
737 738
738 void AutomationProvider::RemoveBrowsingData(int remove_mask) { 739 void AutomationProvider::RemoveBrowsingData(int remove_mask) {
739 BrowsingDataRemover* remover; 740 BrowsingDataRemover* remover;
740 remover = new BrowsingDataRemover(profile(), 741 remover = new BrowsingDataRemover(profile(),
741 BrowsingDataRemover::EVERYTHING, // All time periods. 742 BrowsingDataRemover::EVERYTHING, // All time periods.
742 base::Time()); 743 base::Time());
743 remover->Remove(remove_mask); 744 remover->Remove(remove_mask);
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 } 1001 }
1001 } 1002 }
1002 } 1003 }
1003 1004
1004 void AutomationProvider::SaveAsAsync(int tab_handle) { 1005 void AutomationProvider::SaveAsAsync(int tab_handle) {
1005 NavigationController* tab = NULL; 1006 NavigationController* tab = NULL;
1006 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 1007 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
1007 if (web_contents) 1008 if (web_contents)
1008 web_contents->OnSavePage(); 1009 web_contents->OnSavePage();
1009 } 1010 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_encoding_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698