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

Unified Diff: chrome/browser/ui/libgtkui/gconf_listener.cc

Issue 2707313002: Gtk: Change NULL to nullptr (Closed)
Patch Set: Created 3 years, 10 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 | « chrome/browser/ui/libgtkui/gconf_listener.h ('k') | chrome/browser/ui/libgtkui/gtk_event_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/gconf_listener.cc
diff --git a/chrome/browser/ui/libgtkui/gconf_listener.cc b/chrome/browser/ui/libgtkui/gconf_listener.cc
index 7a3fac78234b66b2b6c6fe8cb7d1ce06379755c0..9beea2500d51b8c94a71646549e7aba6ff52f1f0 100644
--- a/chrome/browser/ui/libgtkui/gconf_listener.cc
+++ b/chrome/browser/ui/libgtkui/gconf_listener.cc
@@ -43,7 +43,7 @@ namespace libgtkui {
// Public interface:
GConfListener::GConfListener(GtkUi* delegate)
- : delegate_(delegate), client_(NULL) {
+ : delegate_(delegate), client_(nullptr) {
std::unique_ptr<base::Environment> env(base::Environment::Create());
base::nix::DesktopEnvironment de =
base::nix::GetDesktopEnvironment(env.get());
@@ -55,7 +55,7 @@ GConfListener::GConfListener(GtkUi* delegate)
// not receiving gconf keys.
if (client_) {
// Register that we're interested in the values of this directory.
- GError* error = NULL;
+ GError* error = nullptr;
gconf_client_add_dir(client_, kMetacityGeneral,
GCONF_CLIENT_PRELOAD_ONELEVEL, &error);
if (HandleGError(error, kMetacityGeneral))
@@ -80,7 +80,7 @@ GConfListener::~GConfListener() {
void GConfListener::GetAndRegister(
const char* key_to_subscribe,
const base::Callback<void(GConfValue*)>& initial_setter) {
- GError* error = NULL;
+ GError* error = nullptr;
GConfValue* gconf_value = gconf_client_get(client_, key_to_subscribe,
&error);
if (HandleGError(error, key_to_subscribe))
@@ -94,7 +94,7 @@ void GConfListener::GetAndRegister(
client_, key_to_subscribe,
reinterpret_cast<void (*)(GConfClient*, guint, GConfEntry*, void*)>(
OnChangeNotificationThunk),
- this, NULL, &error);
+ this, nullptr, &error);
if (HandleGError(error, key_to_subscribe))
return;
}
@@ -112,11 +112,11 @@ void GConfListener::OnChangeNotification(GConfClient* client,
}
bool GConfListener::HandleGError(GError* error, const char* key) {
- if (error != NULL) {
+ if (error != nullptr) {
LOG(ERROR) << "Error with gconf key '" << key << "': " << error->message;
g_error_free(error);
g_object_unref(client_);
- client_ = NULL;
+ client_ = nullptr;
return true;
}
return false;
« no previous file with comments | « chrome/browser/ui/libgtkui/gconf_listener.h ('k') | chrome/browser/ui/libgtkui/gtk_event_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698