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

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

Issue 11866004: Add scheme to HostZoomMap (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Eliminate old methods in interface Created 7 years, 10 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/file_path.h" 10 #include "base/file_path.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 int type, 432 int type,
433 const content::NotificationSource& source, 433 const content::NotificationSource& source,
434 const content::NotificationDetails& details) { 434 const content::NotificationDetails& details) {
435 if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) { 435 if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) {
436 const std::string& host = 436 const std::string& host =
437 *(content::Details<const std::string>(details).ptr()); 437 *(content::Details<const std::string>(details).ptr());
438 if (!host.empty()) { 438 if (!host.empty()) {
439 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); 439 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this);
440 HostZoomMap* parent_host_zoom_map = 440 HostZoomMap* parent_host_zoom_map =
441 HostZoomMap::GetForBrowserContext(profile_); 441 HostZoomMap::GetForBrowserContext(profile_);
442 double level = parent_host_zoom_map->GetZoomLevel(host); 442 double level = parent_host_zoom_map->GetZoomLevel(std::string(), host);
443 host_zoom_map->SetZoomLevel(host, level); 443 host_zoom_map->SetZoomLevel(std::string(), host, level);
444 } 444 }
445 } 445 }
446 } 446 }
447 447
448 #if defined(OS_CHROMEOS) 448 #if defined(OS_CHROMEOS)
449 // Special case of the OffTheRecordProfileImpl which is used while Guest 449 // Special case of the OffTheRecordProfileImpl which is used while Guest
450 // session in CrOS. 450 // session in CrOS.
451 class GuestSessionProfile : public OffTheRecordProfileImpl { 451 class GuestSessionProfile : public OffTheRecordProfileImpl {
452 public: 452 public:
453 explicit GuestSessionProfile(Profile* real_profile) 453 explicit GuestSessionProfile(Profile* real_profile)
(...skipping 15 matching lines...) Expand all
469 OffTheRecordProfileImpl* profile = NULL; 469 OffTheRecordProfileImpl* profile = NULL;
470 #if defined(OS_CHROMEOS) 470 #if defined(OS_CHROMEOS)
471 if (IsGuestSession()) 471 if (IsGuestSession())
472 profile = new GuestSessionProfile(this); 472 profile = new GuestSessionProfile(this);
473 #endif 473 #endif
474 if (!profile) 474 if (!profile)
475 profile = new OffTheRecordProfileImpl(this); 475 profile = new OffTheRecordProfileImpl(this);
476 profile->Init(); 476 profile->Init();
477 return profile; 477 return profile;
478 } 478 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl.cc » ('j') | content/browser/host_zoom_map_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698