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

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

Issue 2461463002: [Sync] Replacing NULL with nullptr/null throughout sync code. (Closed)
Patch Set: Reverted PROFILE_nullptr mistake. Created 4 years, 1 month 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
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/sync_ui_util.h" 8 #include "chrome/browser/sync/sync_ui_util.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 24 matching lines...) Expand all
35 35
36 SyncGlobalError::~SyncGlobalError() { 36 SyncGlobalError::~SyncGlobalError() {
37 DCHECK(!error_controller_) 37 DCHECK(!error_controller_)
38 << "SyncGlobalError::Shutdown() was not called"; 38 << "SyncGlobalError::Shutdown() was not called";
39 } 39 }
40 40
41 void SyncGlobalError::Shutdown() { 41 void SyncGlobalError::Shutdown() {
42 if (!switches::IsMaterialDesignUserMenu()) 42 if (!switches::IsMaterialDesignUserMenu())
43 global_error_service_->RemoveGlobalError(this); 43 global_error_service_->RemoveGlobalError(this);
44 error_controller_->RemoveObserver(this); 44 error_controller_->RemoveObserver(this);
45 error_controller_ = NULL; 45 error_controller_ = nullptr;
46 } 46 }
47 47
48 bool SyncGlobalError::HasMenuItem() { 48 bool SyncGlobalError::HasMenuItem() {
49 return !menu_label_.empty(); 49 return !menu_label_.empty();
50 } 50 }
51 51
52 int SyncGlobalError::MenuItemCommandID() { 52 int SyncGlobalError::MenuItemCommandID() {
53 return IDC_SHOW_SYNC_ERROR; 53 return IDC_SHOW_SYNC_ERROR;
54 } 54 }
55 55
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 if (menu_label != menu_label_ || bubble_message != bubble_message_ || 116 if (menu_label != menu_label_ || bubble_message != bubble_message_ ||
117 bubble_accept_label != bubble_accept_label_) { 117 bubble_accept_label != bubble_accept_label_) {
118 menu_label_ = menu_label; 118 menu_label_ = menu_label;
119 bubble_message_ = bubble_message; 119 bubble_message_ = bubble_message;
120 bubble_accept_label_ = bubble_accept_label; 120 bubble_accept_label_ = bubble_accept_label;
121 121
122 global_error_service_->NotifyErrorsChanged(this); 122 global_error_service_->NotifyErrorsChanged(this);
123 } 123 }
124 } 124 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_error_notifier_factory_ash.cc ('k') | chrome/browser/sync/sync_global_error_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698