Chromium Code Reviews| 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 } | 1948 } |
| 1949 | 1949 |
| 1950 void Browser::OpenBookmarkManagerForNode(int64 node_id) { | 1950 void Browser::OpenBookmarkManagerForNode(int64 node_id) { |
| 1951 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); | 1951 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); |
| 1952 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); | 1952 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); |
| 1953 ShowSingletonTabOverwritingNTP( | 1953 ShowSingletonTabOverwritingNTP( |
| 1954 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL).Resolve( | 1954 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL).Resolve( |
| 1955 StringPrintf("/#%s", base::Int64ToString(node_id).c_str())))); | 1955 StringPrintf("/#%s", base::Int64ToString(node_id).c_str())))); |
| 1956 } | 1956 } |
| 1957 | 1957 |
| 1958 void Browser::OpenBookmarkManagerEditNode(int64 node_id) { | |
| 1959 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); | |
|
Rick Byers
2011/08/04 18:26:07
Avoid the duplicated code here - make all 3 functi
flackr
2011/08/12 18:11:24
Done.
| |
| 1960 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); | |
| 1961 ShowSingletonTabOverwritingNTP( | |
| 1962 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL).Resolve( | |
|
arv (Not doing code reviews)
2011/08/11 22:32:22
fix indentation
flackr
2011/08/12 18:11:24
Done.
| |
| 1963 StringPrintf("/#e=%s", base::Int64ToString(node_id).c_str())))); | |
| 1964 } | |
| 1965 | |
| 1966 void Browser::OpenBookmarkManagerAddNodeIn(int64 node_id) { | |
| 1967 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); | |
| 1968 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); | |
| 1969 ShowSingletonTabOverwritingNTP( | |
| 1970 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL).Resolve( | |
|
arv (Not doing code reviews)
2011/08/11 22:32:22
here too
flackr
2011/08/12 18:11:24
Done.
| |
| 1971 StringPrintf("/#a=%s", base::Int64ToString(node_id).c_str())))); | |
| 1972 } | |
| 1973 | |
| 1958 void Browser::ShowAppMenu() { | 1974 void Browser::ShowAppMenu() { |
| 1959 // We record the user metric for this event in WrenchMenu::RunMenu. | 1975 // We record the user metric for this event in WrenchMenu::RunMenu. |
| 1960 window_->ShowAppMenu(); | 1976 window_->ShowAppMenu(); |
| 1961 } | 1977 } |
| 1962 | 1978 |
| 1963 void Browser::ShowHistoryTab() { | 1979 void Browser::ShowHistoryTab() { |
| 1964 UserMetrics::RecordAction(UserMetricsAction("ShowHistory")); | 1980 UserMetrics::RecordAction(UserMetricsAction("ShowHistory")); |
| 1965 ShowSingletonTabOverwritingNTP( | 1981 ShowSingletonTabOverwritingNTP( |
| 1966 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIHistoryURL))); | 1982 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIHistoryURL))); |
| 1967 } | 1983 } |
| (...skipping 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4814 } | 4830 } |
| 4815 | 4831 |
| 4816 void Browser::ShowSyncSetup() { | 4832 void Browser::ShowSyncSetup() { |
| 4817 ProfileSyncService* service = | 4833 ProfileSyncService* service = |
| 4818 profile()->GetOriginalProfile()->GetProfileSyncService(); | 4834 profile()->GetOriginalProfile()->GetProfileSyncService(); |
| 4819 if (service->HasSyncSetupCompleted()) | 4835 if (service->HasSyncSetupCompleted()) |
| 4820 ShowOptionsTab(chrome::kSyncSetupSubPage); | 4836 ShowOptionsTab(chrome::kSyncSetupSubPage); |
| 4821 else | 4837 else |
| 4822 service->ShowLoginDialog(); | 4838 service->ShowLoginDialog(); |
| 4823 } | 4839 } |
| OLD | NEW |