OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/extensions/extension_window_controller.h" |
| 6 |
| 7 #include "chrome/browser/profiles/profile.h" |
| 8 |
| 9 /////////////////////////////////////////////////////////////////////////////// |
| 10 // ExtensionWindowController |
| 11 |
| 12 ExtensionWindowController::ExtensionWindowController(BaseWindow* window, |
| 13 Profile* profile) : |
| 14 window_(window), |
| 15 profile_(profile) { |
| 16 } |
| 17 |
| 18 bool ExtensionWindowController::MatchesProfile(Profile* match_profile, |
| 19 bool allow_incognito) const { |
| 20 return ((profile_ == match_profile) || |
| 21 (allow_incognito && |
| 22 (match_profile->HasOffTheRecordProfile() && |
| 23 match_profile->GetOffTheRecordProfile() == profile_))); |
| 24 } |
OLD | NEW |