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

Side by Side Diff: chrome/browser/themes/theme_syncable_service.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (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/themes/theme_syncable_service.h" 5 #include "chrome/browser/themes/theme_syncable_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility>
8 9
9 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
10 #include "base/version.h" 11 #include "base/version.h"
11 #include "chrome/browser/extensions/extension_service.h" 12 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/themes/theme_service.h" 14 #include "chrome/browser/themes/theme_service.h"
14 #include "chrome/common/extensions/sync_helper.h" 15 #include "chrome/common/extensions/sync_helper.h"
15 #include "extensions/browser/extension_prefs.h" 16 #include "extensions/browser/extension_prefs.h"
16 #include "extensions/browser/extension_system.h" 17 #include "extensions/browser/extension_system.h"
17 #include "extensions/common/extension.h" 18 #include "extensions/common/extension.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 syncer::ModelType type, 60 syncer::ModelType type,
60 const syncer::SyncDataList& initial_sync_data, 61 const syncer::SyncDataList& initial_sync_data,
61 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, 62 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
62 scoped_ptr<syncer::SyncErrorFactory> error_handler) { 63 scoped_ptr<syncer::SyncErrorFactory> error_handler) {
63 DCHECK(thread_checker_.CalledOnValidThread()); 64 DCHECK(thread_checker_.CalledOnValidThread());
64 DCHECK(!sync_processor_.get()); 65 DCHECK(!sync_processor_.get());
65 DCHECK(sync_processor.get()); 66 DCHECK(sync_processor.get());
66 DCHECK(error_handler.get()); 67 DCHECK(error_handler.get());
67 68
68 syncer::SyncMergeResult merge_result(type); 69 syncer::SyncMergeResult merge_result(type);
69 sync_processor_ = sync_processor.Pass(); 70 sync_processor_ = std::move(sync_processor);
70 sync_error_handler_ = error_handler.Pass(); 71 sync_error_handler_ = std::move(error_handler);
71 72
72 if (initial_sync_data.size() > 1) { 73 if (initial_sync_data.size() > 1) {
73 sync_error_handler_->CreateAndUploadError( 74 sync_error_handler_->CreateAndUploadError(
74 FROM_HERE, 75 FROM_HERE,
75 base::StringPrintf("Received %d theme specifics.", 76 base::StringPrintf("Received %d theme specifics.",
76 static_cast<int>(initial_sync_data.size()))); 77 static_cast<int>(initial_sync_data.size())));
77 } 78 }
78 79
79 sync_pb::ThemeSpecifics current_specifics; 80 sync_pb::ThemeSpecifics current_specifics;
80 if (!GetThemeSpecificsFromCurrentTheme(&current_specifics)) { 81 if (!GetThemeSpecificsFromCurrentTheme(&current_specifics)) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 syncer::SyncChange(FROM_HERE, change_type, 340 syncer::SyncChange(FROM_HERE, change_type,
340 syncer::SyncData::CreateLocalData( 341 syncer::SyncData::CreateLocalData(
341 kCurrentThemeClientTag, kCurrentThemeNodeTitle, 342 kCurrentThemeClientTag, kCurrentThemeNodeTitle,
342 entity_specifics))); 343 entity_specifics)));
343 344
344 DVLOG(1) << "Update theme specifics from current theme: " 345 DVLOG(1) << "Update theme specifics from current theme: "
345 << changes.back().ToString(); 346 << changes.back().ToString();
346 347
347 return sync_processor_->ProcessSyncChanges(FROM_HERE, changes); 348 return sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
348 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698