OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/chromeos/extensions/wallpaper_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 dict->SetBoolean("isOEMDefaultWallpaper", IsOEMDefaultWallpaper()); | 361 dict->SetBoolean("isOEMDefaultWallpaper", IsOEMDefaultWallpaper()); |
362 dict->SetString("canceledWallpaper", | 362 dict->SetString("canceledWallpaper", |
363 wallpaper_api_util::kCancelWallpaperMessage); | 363 wallpaper_api_util::kCancelWallpaperMessage); |
364 | 364 |
365 return RespondNow(OneArgument(std::move(dict))); | 365 return RespondNow(OneArgument(std::move(dict))); |
366 } | 366 } |
367 | 367 |
368 ExtensionFunction::ResponseAction | 368 ExtensionFunction::ResponseAction |
369 WallpaperPrivateGetSyncSettingFunction::Run() { | 369 WallpaperPrivateGetSyncSettingFunction::Run() { |
370 Profile* profile = Profile::FromBrowserContext(browser_context()); | 370 Profile* profile = Profile::FromBrowserContext(browser_context()); |
371 ProfileSyncService* sync = | 371 browser_sync::ProfileSyncService* sync = |
372 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); | 372 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); |
373 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 373 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
374 dict->SetBoolean("syncThemes", | 374 dict->SetBoolean("syncThemes", |
375 sync->GetActiveDataTypes().Has(syncer::THEMES)); | 375 sync->GetActiveDataTypes().Has(syncer::THEMES)); |
376 return RespondNow(OneArgument(std::move(dict))); | 376 return RespondNow(OneArgument(std::move(dict))); |
377 } | 377 } |
378 | 378 |
379 WallpaperPrivateSetWallpaperIfExistsFunction:: | 379 WallpaperPrivateSetWallpaperIfExistsFunction:: |
380 WallpaperPrivateSetWallpaperIfExistsFunction() {} | 380 WallpaperPrivateSetWallpaperIfExistsFunction() {} |
381 | 381 |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 WallpaperPrivateRecordWallpaperUMAFunction::Run() { | 969 WallpaperPrivateRecordWallpaperUMAFunction::Run() { |
970 std::unique_ptr<record_wallpaper_uma::Params> params( | 970 std::unique_ptr<record_wallpaper_uma::Params> params( |
971 record_wallpaper_uma::Params::Create(*args_)); | 971 record_wallpaper_uma::Params::Create(*args_)); |
972 EXTENSION_FUNCTION_VALIDATE(params); | 972 EXTENSION_FUNCTION_VALIDATE(params); |
973 | 973 |
974 user_manager::User::WallpaperType source = getWallpaperType(params->source); | 974 user_manager::User::WallpaperType source = getWallpaperType(params->source); |
975 UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Source", source, | 975 UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Source", source, |
976 user_manager::User::WALLPAPER_TYPE_COUNT); | 976 user_manager::User::WALLPAPER_TYPE_COUNT); |
977 return RespondNow(NoArguments()); | 977 return RespondNow(NoArguments()); |
978 } | 978 } |
OLD | NEW |