| OLD | NEW |
| 1 // Copyright (c) 2011 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 <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1948 void Browser::OpenBookmarkManager() { | 1948 void Browser::OpenBookmarkManager() { |
| 1949 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); | 1949 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); |
| 1950 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); | 1950 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); |
| 1951 ShowSingletonTabOverwritingNTP( | 1951 ShowSingletonTabOverwritingNTP( |
| 1952 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL))); | 1952 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL))); |
| 1953 } | 1953 } |
| 1954 | 1954 |
| 1955 void Browser::OpenBookmarkManagerForNode(int64 node_id) { | 1955 void Browser::OpenBookmarkManagerForNode(int64 node_id) { |
| 1956 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); | 1956 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); |
| 1957 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); | 1957 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); |
| 1958 ShowSingletonTabOverwritingNTP( | 1958 browser::NavigateParams params(GetSingletonTabNavigateParams( |
| 1959 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL).Resolve( | 1959 GURL(chrome::kChromeUIBookmarksURL).Resolve( |
| 1960 StringPrintf("/#%s", base::Int64ToString(node_id).c_str())))); | 1960 StringPrintf("/#%s", base::Int64ToString(node_id).c_str())))); |
| 1961 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
| 1962 ShowSingletonTabOverwritingNTP(params); |
| 1961 } | 1963 } |
| 1962 | 1964 |
| 1963 void Browser::ShowAppMenu() { | 1965 void Browser::ShowAppMenu() { |
| 1964 // We record the user metric for this event in WrenchMenu::RunMenu. | 1966 // We record the user metric for this event in WrenchMenu::RunMenu. |
| 1965 window_->ShowAppMenu(); | 1967 window_->ShowAppMenu(); |
| 1966 } | 1968 } |
| 1967 | 1969 |
| 1968 void Browser::ShowHistoryTab() { | 1970 void Browser::ShowHistoryTab() { |
| 1969 UserMetrics::RecordAction(UserMetricsAction("ShowHistory")); | 1971 UserMetrics::RecordAction(UserMetricsAction("ShowHistory")); |
| 1970 ShowSingletonTabOverwritingNTP( | 1972 ShowSingletonTabOverwritingNTP( |
| (...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4840 } | 4842 } |
| 4841 | 4843 |
| 4842 void Browser::ShowSyncSetup() { | 4844 void Browser::ShowSyncSetup() { |
| 4843 ProfileSyncService* service = | 4845 ProfileSyncService* service = |
| 4844 profile()->GetOriginalProfile()->GetProfileSyncService(); | 4846 profile()->GetOriginalProfile()->GetProfileSyncService(); |
| 4845 if (service->HasSyncSetupCompleted()) | 4847 if (service->HasSyncSetupCompleted()) |
| 4846 ShowOptionsTab(chrome::kSyncSetupSubPage); | 4848 ShowOptionsTab(chrome::kSyncSetupSubPage); |
| 4847 else | 4849 else |
| 4848 service->ShowLoginDialog(); | 4850 service->ShowLoginDialog(); |
| 4849 } | 4851 } |
| OLD | NEW |