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

Side by Side Diff: chrome/browser/ui/webui/sync_internals_message_handler.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « chrome/browser/ui/webui/settings/search_engines_handler.cc ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/webui/sync_internals_message_handler.h" 5 #include "chrome/browser/ui/webui/sync_internals_message_handler.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 25 matching lines...) Expand all
36 sync_driver::SyncService* service, 36 sync_driver::SyncService* service,
37 SigninManagerBase* signin) override { 37 SigninManagerBase* signin) override {
38 return sync_driver::sync_ui_util::ConstructAboutInformation( 38 return sync_driver::sync_ui_util::ConstructAboutInformation(
39 service, signin, chrome::GetChannel()); 39 service, signin, chrome::GetChannel());
40 } 40 }
41 }; 41 };
42 } // namespace 42 } // namespace
43 43
44 SyncInternalsMessageHandler::SyncInternalsMessageHandler() 44 SyncInternalsMessageHandler::SyncInternalsMessageHandler()
45 : SyncInternalsMessageHandler( 45 : SyncInternalsMessageHandler(
46 base::WrapUnique(new UtilAboutSyncDataExtractor())) {} 46 base::MakeUnique<UtilAboutSyncDataExtractor>()) {}
47 47
48 SyncInternalsMessageHandler::SyncInternalsMessageHandler( 48 SyncInternalsMessageHandler::SyncInternalsMessageHandler(
49 std::unique_ptr<AboutSyncDataExtractor> about_sync_data_extractor) 49 std::unique_ptr<AboutSyncDataExtractor> about_sync_data_extractor)
50 : about_sync_data_extractor_(std::move(about_sync_data_extractor)), 50 : about_sync_data_extractor_(std::move(about_sync_data_extractor)),
51 weak_ptr_factory_(this) {} 51 weak_ptr_factory_(this) {}
52 52
53 SyncInternalsMessageHandler::~SyncInternalsMessageHandler() { 53 SyncInternalsMessageHandler::~SyncInternalsMessageHandler() {
54 if (js_controller_) 54 if (js_controller_)
55 js_controller_->RemoveJsEventHandler(this); 55 js_controller_->RemoveJsEventHandler(this);
56 56
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 *value); 244 *value);
245 } 245 }
246 246
247 // Gets the ProfileSyncService of the underlying original profile. 247 // Gets the ProfileSyncService of the underlying original profile.
248 // May return NULL (e.g., if sync is disabled on the command line). 248 // May return NULL (e.g., if sync is disabled on the command line).
249 ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() { 249 ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() {
250 Profile* profile = Profile::FromWebUI(web_ui()); 250 Profile* profile = Profile::FromWebUI(web_ui());
251 return ProfileSyncServiceFactory::GetForProfile( 251 return ProfileSyncServiceFactory::GetForProfile(
252 profile->GetOriginalProfile()); 252 profile->GetOriginalProfile());
253 } 253 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/search_engines_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698