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/views/options/content_page_view.h" | 5 #include "chrome/browser/ui/views/options/content_page_view.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 #include <vsstyle.h> | 9 #include <vsstyle.h> |
10 #include <vssym32.h> | 10 #include <vssym32.h> |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 void ContentPageView::LinkActivated(views::Link* source, int event_flags) { | 154 void ContentPageView::LinkActivated(views::Link* source, int event_flags) { |
155 if (source == themes_gallery_link_) { | 155 if (source == themes_gallery_link_) { |
156 UserMetricsRecordAction(UserMetricsAction("Options_ThemesGallery"), | 156 UserMetricsRecordAction(UserMetricsAction("Options_ThemesGallery"), |
157 profile()->GetPrefs()); | 157 profile()->GetPrefs()); |
158 BrowserList::GetLastActive()->OpenThemeGalleryTabAndActivate(); | 158 BrowserList::GetLastActive()->OpenThemeGalleryTabAndActivate(); |
159 return; | 159 return; |
160 } | 160 } |
161 if (source == sync_action_link_) { | 161 if (source == sync_action_link_) { |
162 DCHECK(sync_service_ && !sync_service_->IsManaged()); | 162 DCHECK(sync_service_ && !sync_service_->IsManaged()); |
163 sync_service_->ShowLoginDialog(GetWindow()->GetNativeWindow()); | 163 sync_service_->ShowErrorUI(GetWindow()->GetNativeWindow()); |
164 return; | 164 return; |
165 } | 165 } |
166 if (source == privacy_dashboard_link_) { | 166 if (source == privacy_dashboard_link_) { |
167 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); | 167 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); |
168 return; | 168 return; |
169 } | 169 } |
170 NOTREACHED() << "Invalid link source."; | 170 NOTREACHED() << "Invalid link source."; |
171 } | 171 } |
172 | 172 |
173 //////////////////////////////////////////////////////////////////////////////// | 173 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 sync_action_link_->SetEnabled(!managed); | 499 sync_action_link_->SetEnabled(!managed); |
500 | 500 |
501 if (status_has_error) { | 501 if (status_has_error) { |
502 sync_status_label_->set_background(CreateErrorBackground()); | 502 sync_status_label_->set_background(CreateErrorBackground()); |
503 sync_action_link_->set_background(CreateErrorBackground()); | 503 sync_action_link_->set_background(CreateErrorBackground()); |
504 } else { | 504 } else { |
505 sync_status_label_->set_background(NULL); | 505 sync_status_label_->set_background(NULL); |
506 sync_action_link_->set_background(NULL); | 506 sync_action_link_->set_background(NULL); |
507 } | 507 } |
508 } | 508 } |
OLD | NEW |