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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 954923005: Make command-zero reset page scale in addition to zoom level (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again again Created 5 years, 9 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/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 profile = new OffTheRecordProfileImpl(this); 553 profile = new OffTheRecordProfileImpl(this);
554 profile->Init(); 554 profile->Init();
555 return profile; 555 return profile;
556 } 556 }
557 557
558 void OffTheRecordProfileImpl::OnParentZoomLevelChanged( 558 void OffTheRecordProfileImpl::OnParentZoomLevelChanged(
559 const HostZoomMap::ZoomLevelChange& change) { 559 const HostZoomMap::ZoomLevelChange& change) {
560 HostZoomMap* host_zoom_map = HostZoomMap::GetDefaultForBrowserContext(this); 560 HostZoomMap* host_zoom_map = HostZoomMap::GetDefaultForBrowserContext(this);
561 switch (change.mode) { 561 switch (change.mode) {
562 case HostZoomMap::ZOOM_CHANGED_TEMPORARY_ZOOM: 562 case HostZoomMap::ZOOM_CHANGED_TEMPORARY_ZOOM:
563 return; 563 return;
564 case HostZoomMap::ZOOM_CHANGED_FOR_HOST: 564 case HostZoomMap::ZOOM_CHANGED_FOR_HOST:
565 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level); 565 host_zoom_map->SetZoomLevelForHost(change.host, change.zoom_level);
566 return; 566 return;
567 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST: 567 case HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST:
568 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme, 568 host_zoom_map->SetZoomLevelForHostAndScheme(change.scheme,
569 change.host, 569 change.host,
570 change.zoom_level); 570 change.zoom_level);
571 return; 571 return;
572 case HostZoomMap::PAGE_SCALE_IS_ONE_CHANGED:
573 return;
572 } 574 }
573 } 575 }
574 576
575 void OffTheRecordProfileImpl::UpdateDefaultZoomLevel() { 577 void OffTheRecordProfileImpl::UpdateDefaultZoomLevel() {
576 HostZoomMap* host_zoom_map = HostZoomMap::GetDefaultForBrowserContext(this); 578 HostZoomMap* host_zoom_map = HostZoomMap::GetDefaultForBrowserContext(this);
577 double default_zoom_level = 579 double default_zoom_level =
578 profile_->GetZoomLevelPrefs()->GetDefaultZoomLevelPref(); 580 profile_->GetZoomLevelPrefs()->GetDefaultZoomLevelPref();
579 host_zoom_map->SetDefaultZoomLevel(default_zoom_level); 581 host_zoom_map->SetDefaultZoomLevel(default_zoom_level);
580 } 582 }
581 583
582 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 584 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
583 #if defined(OS_CHROMEOS) 585 #if defined(OS_CHROMEOS)
584 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 586 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
585 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 587 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
586 g_browser_process->local_state()); 588 g_browser_process->local_state());
587 } 589 }
588 #endif // defined(OS_CHROMEOS) 590 #endif // defined(OS_CHROMEOS)
589 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 591 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
590 GetPrefs(), g_browser_process->local_state()); 592 GetPrefs(), g_browser_process->local_state());
591 } 593 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_commands_unittest.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698