summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/tab_contents.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 16:46:40 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 16:46:40 +0000
commit911f815112d8d11778c771467fbef2c2b1f8e160 (patch)
treea6f9aa0ad2d669de7860e6f4da1b9e7f31f1354d /chrome/browser/tab_contents/tab_contents.cc
parent4a827847f1b9b860bcd5c45725249a3de3cfc205 (diff)
downloadchromium_src-911f815112d8d11778c771467fbef2c2b1f8e160.zip
chromium_src-911f815112d8d11778c771467fbef2c2b1f8e160.tar.gz
chromium_src-911f815112d8d11778c771467fbef2c2b1f8e160.tar.bz2
Makes pinned tab restore on startup if you haven't enabled session
restore. BUG=23613 TEST=turn off session restore, pin a tab, restart chrome and make sure you get back the pinned tab. Review URL: http://codereview.chromium.org/1026005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41958 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.cc')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 4645315..97e49b3 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -482,6 +482,19 @@ void TabContents::SetAppExtension(Extension* extension) {
NotificationService::NoDetails());
}
+void TabContents::SetAppExtensionById(const std::string& app_extension_id) {
+ if (app_extension_id.empty())
+ return;
+
+ ExtensionsService* extension_service = profile()->GetExtensionsService();
+ if (extension_service && extension_service->is_ready()) {
+ Extension* extension =
+ extension_service->GetExtensionById(app_extension_id, false);
+ if (extension)
+ SetAppExtension(extension);
+ }
+}
+
const GURL& TabContents::GetURL() const {
// We may not have a navigation entry yet
NavigationEntry* entry = controller_.GetActiveEntry();