Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: chrome/browser/dom_ui/options/personal_options_handler.cc

Issue 6260002: Fix chromium-os:10777 and other sync related crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve comment. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/dom_ui/options/sync_options_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/dom_ui/options/sync_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698