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

Side by Side Diff: chrome/browser/chromeos/arc/arc_settings_service.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/arc/arc_settings_service.h" 5 #include "chrome/browser/chromeos/arc/arc_settings_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Returns the integer value of the pref. pref_name must exist. 61 // Returns the integer value of the pref. pref_name must exist.
62 int GetIntegerPref(const std::string& pref_name) const; 62 int GetIntegerPref(const std::string& pref_name) const;
63 63
64 // Sends a broadcast to the delegate. 64 // Sends a broadcast to the delegate.
65 void SendSettingsBroadcast(const std::string& action, 65 void SendSettingsBroadcast(const std::string& action,
66 const base::DictionaryValue& extras) const; 66 const base::DictionaryValue& extras) const;
67 67
68 // Manages pref observation registration. 68 // Manages pref observation registration.
69 PrefChangeRegistrar registrar_; 69 PrefChangeRegistrar registrar_;
70 70
71 scoped_ptr<chromeos::CrosSettings::ObserverSubscription> 71 std::unique_ptr<chromeos::CrosSettings::ObserverSubscription>
72 reporting_consent_subscription_; 72 reporting_consent_subscription_;
73 ArcBridgeService* const arc_bridge_service_; 73 ArcBridgeService* const arc_bridge_service_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(ArcSettingsServiceImpl); 75 DISALLOW_COPY_AND_ASSIGN(ArcSettingsServiceImpl);
76 }; 76 };
77 77
78 ArcSettingsServiceImpl::ArcSettingsServiceImpl( 78 ArcSettingsServiceImpl::ArcSettingsServiceImpl(
79 ArcBridgeService* arc_bridge_service) 79 ArcBridgeService* arc_bridge_service)
80 : arc_bridge_service_(arc_bridge_service) { 80 : arc_bridge_service_(arc_bridge_service) {
81 StartObservingSettingsChanges(); 81 StartObservingSettingsChanges();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 void ArcSettingsService::OnIntentHelperInstanceReady() { 253 void ArcSettingsService::OnIntentHelperInstanceReady() {
254 impl_.reset(new ArcSettingsServiceImpl(arc_bridge_service())); 254 impl_.reset(new ArcSettingsServiceImpl(arc_bridge_service()));
255 } 255 }
256 256
257 void ArcSettingsService::OnIntentHelperInstanceClosed() { 257 void ArcSettingsService::OnIntentHelperInstanceClosed() {
258 impl_.reset(); 258 impl_.reset();
259 } 259 }
260 260
261 } // namespace arc 261 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698