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

Side by Side Diff: chrome/browser/sync/sync_global_error.cc

Issue 492553002: Fix debug error message (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sync/sync_global_error.h" 5 #include "chrome/browser/sync/sync_global_error.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/sync/profile_sync_service.h" 8 #include "chrome/browser/sync/profile_sync_service.h"
9 #include "chrome/browser/sync/sync_ui_util.h" 9 #include "chrome/browser/sync/sync_ui_util.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 13 matching lines...) Expand all
24 : error_controller_(error_controller), 24 : error_controller_(error_controller),
25 service_(profile_sync_service) { 25 service_(profile_sync_service) {
26 DCHECK(service_); 26 DCHECK(service_);
27 error_controller_->AddObserver(this); 27 error_controller_->AddObserver(this);
28 GlobalErrorServiceFactory::GetForProfile(service_->profile())-> 28 GlobalErrorServiceFactory::GetForProfile(service_->profile())->
29 AddGlobalError(this); 29 AddGlobalError(this);
30 } 30 }
31 31
32 SyncGlobalError::~SyncGlobalError() { 32 SyncGlobalError::~SyncGlobalError() {
33 DCHECK(!error_controller_) 33 DCHECK(!error_controller_)
34 << "SigninGlobalError::Shutdown() was not called"; 34 << "SyncGlobalError::Shutdown() was not called";
35 } 35 }
36 36
37 void SyncGlobalError::Shutdown() { 37 void SyncGlobalError::Shutdown() {
38 GlobalErrorServiceFactory::GetForProfile(service_->profile())-> 38 GlobalErrorServiceFactory::GetForProfile(service_->profile())->
39 RemoveGlobalError(this); 39 RemoveGlobalError(this);
40 error_controller_->RemoveObserver(this); 40 error_controller_->RemoveObserver(this);
41 error_controller_ = NULL; 41 error_controller_ = NULL;
42 } 42 }
43 43
44 bool SyncGlobalError::HasMenuItem() { 44 bool SyncGlobalError::HasMenuItem() {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bubble_accept_label_ = bubble_accept_label; 115 bubble_accept_label_ = bubble_accept_label;
116 116
117 // Profile can be NULL during tests. 117 // Profile can be NULL during tests.
118 Profile* profile = service_->profile(); 118 Profile* profile = service_->profile();
119 if (profile) { 119 if (profile) {
120 GlobalErrorServiceFactory::GetForProfile( 120 GlobalErrorServiceFactory::GetForProfile(
121 profile)->NotifyErrorsChanged(this); 121 profile)->NotifyErrorsChanged(this);
122 } 122 }
123 } 123 }
124 } 124 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698