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

Side by Side Diff: chrome/browser/extensions/extension_service_test_base.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 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/extensions/extension_service_test_base.h" 5 #include "chrome/browser/extensions/extension_service_test_base.h"
6 6
7 #include <utility>
8
7 #include "base/command_line.h" 9 #include "base/command_line.h"
8 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 12 #include "base/path_service.h"
11 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
13 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
14 #include "build/build_config.h" 16 #include "build/build_config.h"
15 #include "chrome/browser/extensions/component_loader.h" 17 #include "chrome/browser/extensions/component_loader.h"
16 #include "chrome/browser/extensions/extension_error_reporter.h" 18 #include "chrome/browser/extensions/extension_error_reporter.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // If pref_file is empty, TestingProfile automatically creates 52 // If pref_file is empty, TestingProfile automatically creates
51 // syncable_prefs::TestingPrefServiceSyncable instance. 53 // syncable_prefs::TestingPrefServiceSyncable instance.
52 if (!params.pref_file.empty()) { 54 if (!params.pref_file.empty()) {
53 factory.SetUserPrefsFile(params.pref_file, 55 factory.SetUserPrefsFile(params.pref_file,
54 base::ThreadTaskRunnerHandle::Get().get()); 56 base::ThreadTaskRunnerHandle::Get().get());
55 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( 57 scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
56 new user_prefs::PrefRegistrySyncable); 58 new user_prefs::PrefRegistrySyncable);
57 scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs( 59 scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs(
58 factory.CreateSyncable(registry.get())); 60 factory.CreateSyncable(registry.get()));
59 chrome::RegisterUserProfilePrefs(registry.get()); 61 chrome::RegisterUserProfilePrefs(registry.get());
60 profile_builder.SetPrefService(prefs.Pass()); 62 profile_builder.SetPrefService(std::move(prefs));
61 } 63 }
62 64
63 if (params.profile_is_supervised) 65 if (params.profile_is_supervised)
64 profile_builder.SetSupervisedUserId("asdf"); 66 profile_builder.SetSupervisedUserId("asdf");
65 67
66 profile_builder.SetPath(params.profile_path); 68 profile_builder.SetPath(params.profile_path);
67 return profile_builder.Build(); 69 return profile_builder.Build();
68 } 70 }
69 71
70 } // namespace 72 } // namespace
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // interfere with the tests. Those tests that need an external provider 323 // interfere with the tests. Those tests that need an external provider
322 // will register one specifically. 324 // will register one specifically.
323 service_->ClearProvidersForTesting(); 325 service_->ClearProvidersForTesting();
324 326
325 #if defined(OS_CHROMEOS) 327 #if defined(OS_CHROMEOS)
326 InstallLimiter::Get(profile_.get())->DisableForTest(); 328 InstallLimiter::Get(profile_.get())->DisableForTest();
327 #endif 329 #endif
328 } 330 }
329 331
330 } // namespace extensions 332 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698