Chromium Code Reviews| Index: chrome/browser/dom_ui/options/personal_options_handler.cc |
| diff --git a/chrome/browser/dom_ui/options/personal_options_handler.cc b/chrome/browser/dom_ui/options/personal_options_handler.cc |
| index bc14c1f6e3eb8b723e28b9fa9c71aeb2853834ce..7102a7ac8b59fb89996110084e680bb625c2cad6 100644 |
| --- a/chrome/browser/dom_ui/options/personal_options_handler.cc |
| +++ b/chrome/browser/dom_ui/options/personal_options_handler.cc |
| @@ -154,6 +154,7 @@ void PersonalOptionsHandler::OnStateChanged() { |
| string16 status_label; |
| string16 link_label; |
| ProfileSyncService* service = dom_ui_->GetProfile()->GetProfileSyncService(); |
| + DCHECK(service); |
|
akalin
2011/01/14 00:26:37
I prefer these to be CHECK()s since you're derefer
|
| bool managed = service->IsManaged(); |
| bool sync_setup_completed = service->HasSyncSetupCompleted(); |
| bool status_has_error = sync_ui_util::GetStatusLabels(service, |
| @@ -275,6 +276,7 @@ void PersonalOptionsHandler::ShowSyncLoginDialog(const ListValue* args) { |
| dom_ui_->tab_contents(), UTF8ToUTF16(email), message, this); |
| #else |
| ProfileSyncService* service = dom_ui_->GetProfile()->GetProfileSyncService(); |
| + DCHECK(service); |
| service->ShowLoginDialog(NULL); |
| ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS); |
| #endif |