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

Side by Side Diff: chrome/browser/prefs/preferences_manager.cc

Issue 2598963005: Include-what-you-use for WrapUnique/MakeUnique. (Closed)
Patch Set: restore order of includes in x11_topmost_window_finder_interactive_uitest.cc Created 3 years, 12 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/prefs/preferences_manager.h" 5 #include "chrome/browser/prefs/preferences_manager.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ptr_util.h"
9 #include "base/values.h" 10 #include "base/values.h"
10 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
11 #include "components/prefs/pref_change_registrar.h" 12 #include "components/prefs/pref_change_registrar.h"
12 #include "components/prefs/pref_service.h" 13 #include "components/prefs/pref_service.h"
13 14
14 PreferencesManager::PreferencesManager(Profile* profile) 15 PreferencesManager::PreferencesManager(Profile* profile)
15 : preferences_change_registrar_(new PrefChangeRegistrar), 16 : preferences_change_registrar_(new PrefChangeRegistrar),
16 setting_preferences_(false) { 17 setting_preferences_(false) {
17 DCHECK(profile); 18 DCHECK(profile);
18 service_ = profile->GetPrefs(); 19 service_ = profile->GetPrefs();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 preferences_change_registrar_->Add( 81 preferences_change_registrar_->Add(
81 it, base::Bind(&PreferencesManager::PreferenceChanged, 82 it, base::Bind(&PreferencesManager::PreferenceChanged,
82 base::Unretained(this))); 83 base::Unretained(this)));
83 dictionary->Set(it, pref->GetValue()->CreateDeepCopy()); 84 dictionary->Set(it, pref->GetValue()->CreateDeepCopy());
84 } 85 }
85 86
86 if (dictionary->empty()) 87 if (dictionary->empty())
87 return; 88 return;
88 client_->OnPreferencesChanged(std::move(dictionary)); 89 client_->OnPreferencesChanged(std::move(dictionary));
89 } 90 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/preferences_connection_manager.cc ('k') | chrome/browser/prefs/preferences_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698