| OLD | NEW | 
|     1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |     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 |     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/ui/browser.h" |     5 #include "chrome/browser/ui/browser.h" | 
|     6  |     6  | 
|     7 #if defined(OS_WIN) |     7 #if defined(OS_WIN) | 
|     8 #include <shellapi.h> |     8 #include <shellapi.h> | 
|     9 #include <windows.h> |     9 #include <windows.h> | 
|    10 #endif  // OS_WIN |    10 #endif  // OS_WIN | 
|    11  |    11  | 
| (...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1731   UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar"), profile_); |  1731   UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar"), profile_); | 
|  1732   window_->ToggleBookmarkBar(); |  1732   window_->ToggleBookmarkBar(); | 
|  1733 } |  1733 } | 
|  1734  |  1734  | 
|  1735 void Browser::OpenBookmarkManager() { |  1735 void Browser::OpenBookmarkManager() { | 
|  1736   UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager"), profile_); |  1736   UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager"), profile_); | 
|  1737   ShowBookmarkManagerTab(); |  1737   ShowBookmarkManagerTab(); | 
|  1738 } |  1738 } | 
|  1739  |  1739  | 
|  1740 void Browser::ShowAppMenu() { |  1740 void Browser::ShowAppMenu() { | 
|  1741   UserMetrics::RecordAction(UserMetricsAction("ShowAppMenu"), profile_); |  1741   // We record the user metric for this event in WrenchMenu::RunMenu. | 
|  1742   window_->ShowAppMenu(); |  1742   window_->ShowAppMenu(); | 
|  1743 } |  1743 } | 
|  1744  |  1744  | 
|  1745 void Browser::ShowBookmarkManagerTab() { |  1745 void Browser::ShowBookmarkManagerTab() { | 
|  1746   UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks"), profile_); |  1746   UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks"), profile_); | 
|  1747   ShowSingletonTab(GURL(chrome::kChromeUIBookmarksURL), false); |  1747   ShowSingletonTab(GURL(chrome::kChromeUIBookmarksURL), false); | 
|  1748 } |  1748 } | 
|  1749  |  1749  | 
|  1750 void Browser::ShowHistoryTab() { |  1750 void Browser::ShowHistoryTab() { | 
|  1751   UserMetrics::RecordAction(UserMetricsAction("ShowHistory"), profile_); |  1751   UserMetrics::RecordAction(UserMetricsAction("ShowHistory"), profile_); | 
| (...skipping 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4235     // The page transition below is only for the purpose of inserting the tab. |  4235     // The page transition below is only for the purpose of inserting the tab. | 
|  4236     browser->AddTab(view_source_contents, PageTransition::LINK); |  4236     browser->AddTab(view_source_contents, PageTransition::LINK); | 
|  4237   } |  4237   } | 
|  4238  |  4238  | 
|  4239   if (profile_->HasSessionService()) { |  4239   if (profile_->HasSessionService()) { | 
|  4240     SessionService* session_service = profile_->GetSessionService(); |  4240     SessionService* session_service = profile_->GetSessionService(); | 
|  4241     if (session_service) |  4241     if (session_service) | 
|  4242       session_service->TabRestored(&view_source_contents->controller(), false); |  4242       session_service->TabRestored(&view_source_contents->controller(), false); | 
|  4243   } |  4243   } | 
|  4244 } |  4244 } | 
| OLD | NEW |