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/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 Loading... |
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 Loading... |
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 } |
OLD | NEW |