| 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 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1990 | 1990 |
| 1991 void Browser::ToggleBookmarkBar() { | 1991 void Browser::ToggleBookmarkBar() { |
| 1992 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar")); | 1992 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar")); |
| 1993 window_->ToggleBookmarkBar(); | 1993 window_->ToggleBookmarkBar(); |
| 1994 } | 1994 } |
| 1995 | 1995 |
| 1996 void Browser::OpenBookmarkManager() { | 1996 void Browser::OpenBookmarkManager() { |
| 1997 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); | 1997 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); |
| 1998 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); | 1998 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); |
| 1999 ShowSingletonTabOverwritingNTP( | 1999 ShowSingletonTabOverwritingNTP( |
| 2000 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL))); | 2000 GetSingletonTabNavigateParams(GURL(chrome::kChromeUIBookmarksURL))); |
| 2001 } | 2001 } |
| 2002 | 2002 |
| 2003 void Browser::OpenBookmarkManagerWithHash(const std::string& action, | 2003 void Browser::OpenBookmarkManagerWithHash(const std::string& action, |
| 2004 int64 node_id) { | 2004 int64 node_id) { |
| 2005 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); | 2005 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager")); |
| 2006 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); | 2006 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarks")); |
| 2007 browser::NavigateParams params(GetSingletonTabNavigateParams( | 2007 browser::NavigateParams params(GetSingletonTabNavigateParams( |
| 2008 GURL(chrome::kChromeUIBookmarksURL).Resolve( | 2008 GURL(chrome::kChromeUIBookmarksURL).Resolve( |
| 2009 StringPrintf("/#%s%s", action.c_str(), | 2009 StringPrintf("/#%s%s", action.c_str(), |
| 2010 base::Int64ToString(node_id).c_str())))); | 2010 base::Int64ToString(node_id).c_str())))); |
| (...skipping 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5116 } | 5116 } |
| 5117 | 5117 |
| 5118 void Browser::ShowSyncSetup() { | 5118 void Browser::ShowSyncSetup() { |
| 5119 ProfileSyncService* service = | 5119 ProfileSyncService* service = |
| 5120 profile()->GetOriginalProfile()->GetProfileSyncService(); | 5120 profile()->GetOriginalProfile()->GetProfileSyncService(); |
| 5121 if (service->HasSyncSetupCompleted()) | 5121 if (service->HasSyncSetupCompleted()) |
| 5122 ShowOptionsTab(chrome::kSyncSetupSubPage); | 5122 ShowOptionsTab(chrome::kSyncSetupSubPage); |
| 5123 else | 5123 else |
| 5124 service->ShowLoginDialog(); | 5124 service->ShowLoginDialog(); |
| 5125 } | 5125 } |
| OLD | NEW |