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/ui/panels/extension_panel_originator.h" |
| 6 |
| 7 #include "chrome/browser/extensions/extension_prefs.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/common/extensions/extension.h" |
| 11 |
| 12 ExtensionPanelOriginator::ExtensionPanelOriginator( |
| 13 const Extension* extension, Profile* profile) |
| 14 : extension_(extension) { |
| 15 ExtensionPrefs* prefs = profile->GetExtensionService()->extension_prefs(); |
| 16 install_time_ = prefs->GetInstallTime(extension->id()); |
| 17 } |
| 18 |
| 19 std::string ExtensionPanelOriginator::GetOriginatorName() const { |
| 20 return extension_->name(); |
| 21 } |
| 22 |
| 23 std::string ExtensionPanelOriginator::GetOriginatorDescription() const { |
| 24 return extension_->description(); |
| 25 } |
| 26 |
| 27 base::Time ExtensionPanelOriginator::GetOriginatorInstallTime() const { |
| 28 return install_time_; |
| 29 } |
OLD | NEW |