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

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

Issue 10409046: Migrate the rest of the "global" prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments 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
« no previous file with comments | « no previous file | chrome/browser/browser_encoding_browsertest.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) 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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 return; 667 return;
668 } 668 }
669 669
670 if (tab_tracker_->ContainsHandle(tab_handle)) { 670 if (tab_tracker_->ContainsHandle(tab_handle)) {
671 NavigationController* tab = tab_tracker_->GetResource(tab_handle); 671 NavigationController* tab = tab_tracker_->GetResource(tab_handle);
672 DCHECK(tab != NULL); 672 DCHECK(tab != NULL);
673 if (tab && tab->GetWebContents()) { 673 if (tab && tab->GetWebContents()) {
674 DCHECK(tab->GetWebContents()->GetBrowserContext() != NULL); 674 DCHECK(tab->GetWebContents()->GetBrowserContext() != NULL);
675 Profile* profile = Profile::FromBrowserContext( 675 Profile* profile = Profile::FromBrowserContext(
676 tab->GetWebContents()->GetBrowserContext()); 676 tab->GetWebContents()->GetBrowserContext());
677 profile->GetPrefs()->SetInteger( 677 profile->GetPrefs()->SetInteger(prefs::kWebKitDefaultFontSize, font_size);
678 prefs::kWebKitGlobalDefaultFontSize, font_size);
679 } 678 }
680 } 679 }
681 } 680 }
682 681
683 void AutomationProvider::RemoveBrowsingData(int remove_mask) { 682 void AutomationProvider::RemoveBrowsingData(int remove_mask) {
684 BrowsingDataRemover* remover; 683 BrowsingDataRemover* remover;
685 remover = new BrowsingDataRemover(profile(), 684 remover = new BrowsingDataRemover(profile(),
686 BrowsingDataRemover::EVERYTHING, // All time periods. 685 BrowsingDataRemover::EVERYTHING, // All time periods.
687 base::Time()); 686 base::Time());
688 remover->Remove(remove_mask); 687 remover->Remove(remove_mask);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 756
758 return NULL; 757 return NULL;
759 } 758 }
760 759
761 void AutomationProvider::SaveAsAsync(int tab_handle) { 760 void AutomationProvider::SaveAsAsync(int tab_handle) {
762 NavigationController* tab = NULL; 761 NavigationController* tab = NULL;
763 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 762 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
764 if (web_contents) 763 if (web_contents)
765 web_contents->OnSavePage(); 764 web_contents->OnSavePage();
766 } 765 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_encoding_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698