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

Side by Side Diff: chrome/browser/extensions/api/settings_overrides/settings_overrides_api.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/api/settings_overrides/settings_overrides_ap i.h" 5 #include "chrome/browser/extensions/api/settings_overrides/settings_overrides_ap i.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility>
8 9
9 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
10 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/extensions/api/preference/preference_api.h" 12 #include "chrome/browser/extensions/api/preference/preference_api.h"
12 #include "chrome/browser/prefs/session_startup_pref.h" 13 #include "chrome/browser/prefs/session_startup_pref.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/search_engines/template_url_service_factory.h" 15 #include "chrome/browser/search_engines/template_url_service_factory.h"
15 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler. h" 16 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler. h"
16 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
17 #include "components/search_engines/search_engines_pref_names.h" 18 #include "components/search_engines/search_engines_pref_names.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 scoped_ptr<TemplateURL::AssociatedExtensionInfo> info( 270 scoped_ptr<TemplateURL::AssociatedExtensionInfo> info(
270 new TemplateURL::AssociatedExtensionInfo( 271 new TemplateURL::AssociatedExtensionInfo(
271 TemplateURL::NORMAL_CONTROLLED_BY_EXTENSION, extension->id())); 272 TemplateURL::NORMAL_CONTROLLED_BY_EXTENSION, extension->id()));
272 info->wants_to_be_default_engine = settings->search_engine->is_default; 273 info->wants_to_be_default_engine = settings->search_engine->is_default;
273 ExtensionPrefs* prefs = ExtensionPrefs::Get(profile_); 274 ExtensionPrefs* prefs = ExtensionPrefs::Get(profile_);
274 info->install_time = prefs->GetInstallTime(extension->id()); 275 info->install_time = prefs->GetInstallTime(extension->id());
275 std::string install_parameter = prefs->GetInstallParam(extension->id()); 276 std::string install_parameter = prefs->GetInstallParam(extension->id());
276 TemplateURLData data = ConvertSearchProvider( 277 TemplateURLData data = ConvertSearchProvider(
277 profile_->GetPrefs(), *settings->search_engine, install_parameter); 278 profile_->GetPrefs(), *settings->search_engine, install_parameter);
278 data.show_in_default_list = info->wants_to_be_default_engine; 279 data.show_in_default_list = info->wants_to_be_default_engine;
279 url_service_->AddExtensionControlledTURL(new TemplateURL(data), info.Pass()); 280 url_service_->AddExtensionControlledTURL(new TemplateURL(data),
281 std::move(info));
280 } 282 }
281 283
282 template <> 284 template <>
283 void BrowserContextKeyedAPIFactory< 285 void BrowserContextKeyedAPIFactory<
284 SettingsOverridesAPI>::DeclareFactoryDependencies() { 286 SettingsOverridesAPI>::DeclareFactoryDependencies() {
285 DependsOn(ExtensionPrefsFactory::GetInstance()); 287 DependsOn(ExtensionPrefsFactory::GetInstance());
286 DependsOn(PreferenceAPI::GetFactoryInstance()); 288 DependsOn(PreferenceAPI::GetFactoryInstance());
287 DependsOn(TemplateURLServiceFactory::GetInstance()); 289 DependsOn(TemplateURLServiceFactory::GetInstance());
288 } 290 }
289 291
290 } // namespace extensions 292 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698