Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/clear_server_data.h" | 5 #include "chrome/browser/views/clear_server_data.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 } | 243 } |
| 244 | 244 |
| 245 void ClearServerDataView::LinkActivated(views::Link* source, | 245 void ClearServerDataView::LinkActivated(views::Link* source, |
| 246 int event_flags) { | 246 int event_flags) { |
| 247 Browser* browser = Browser::Create(profile_); | 247 Browser* browser = Browser::Create(profile_); |
| 248 if (source == flash_link_) { | 248 if (source == flash_link_) { |
| 249 browser->OpenURL(GURL(l10n_util::GetStringUTF8(IDS_FLASH_STORAGE_URL)), | 249 browser->OpenURL(GURL(l10n_util::GetStringUTF8(IDS_FLASH_STORAGE_URL)), |
| 250 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 250 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); |
| 251 browser->window()->Show(); | 251 browser->window()->Show(); |
| 252 } else { | 252 } else { |
| 253 browser->OpenURL(GURL(l10n_util::GetStringUTF8(IDS_PRIVACY_DASHBOARD_URL)), | 253 browser->OpenPrivacyDashboardTabAndActivate(); |
|
tfarina
2010/11/02 02:30:05
Removed the call to Show. OK to commit?
tony
2010/11/02 18:40:28
I can't even seem to find where this view is shown
| |
| 254 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | |
| 255 browser->window()->Show(); | |
| 256 } | 254 } |
| 257 } | 255 } |
| 258 | 256 |
| 259 //////////////////////////////////////////////////////////////////////////////// | 257 //////////////////////////////////////////////////////////////////////////////// |
| 260 // ClearServerDataView, ConfirmMessageBoxObserver implementation: | 258 // ClearServerDataView, ConfirmMessageBoxObserver implementation: |
| 261 | 259 |
| 262 void ClearServerDataView::OnConfirmMessageAccept() { | 260 void ClearServerDataView::OnConfirmMessageAccept() { |
| 263 clear_data_parent_window_->StartClearingServerData(); | 261 clear_data_parent_window_->StartClearingServerData(); |
| 264 sync_service_->ClearServerData(); | 262 sync_service_->ClearServerData(); |
| 265 UpdateControlEnabledState(); | 263 UpdateControlEnabledState(); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 } | 335 } |
| 338 | 336 |
| 339 void ClearServerDataView::UpdateClearButtonEnabledState( | 337 void ClearServerDataView::UpdateClearButtonEnabledState( |
| 340 bool delete_in_progress) { | 338 bool delete_in_progress) { |
| 341 this->clear_server_data_button_->SetEnabled( | 339 this->clear_server_data_button_->SetEnabled( |
| 342 sync_service_ != NULL && | 340 sync_service_ != NULL && |
| 343 sync_service_->HasSyncSetupCompleted() && | 341 sync_service_->HasSyncSetupCompleted() && |
| 344 !delete_in_progress && allow_clear_); | 342 !delete_in_progress && allow_clear_); |
| 345 } | 343 } |
| 346 | 344 |
| OLD | NEW |