| OLD | NEW |
| 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/chromeos/extensions/wallpaper_api.h" | 5 #include "chrome/browser/chromeos/extensions/wallpaper_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/desktop_background/desktop_background_controller.h" | 11 #include "ash/desktop_background/desktop_background_controller.h" |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/memory/ref_counted_memory.h" |
| 14 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 15 #include "base/threading/worker_pool.h" | 16 #include "base/threading/worker_pool.h" |
| 16 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" | 18 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" |
| 18 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 19 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 21 #include "chrome/common/extensions/extension_constants.h" | 22 #include "chrome/common/extensions/extension_constants.h" |
| 22 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 23 #include "components/prefs/pref_service.h" | 24 #include "components/prefs/pref_service.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 const std::string& response) { | 248 const std::string& response) { |
| 248 if (success) { | 249 if (success) { |
| 249 params_->details.data.reset( | 250 params_->details.data.reset( |
| 250 new std::vector<char>(response.begin(), response.end())); | 251 new std::vector<char>(response.begin(), response.end())); |
| 251 StartDecode(*params_->details.data); | 252 StartDecode(*params_->details.data); |
| 252 } else { | 253 } else { |
| 253 SetError(response); | 254 SetError(response); |
| 254 SendResponse(false); | 255 SendResponse(false); |
| 255 } | 256 } |
| 256 } | 257 } |
| OLD | NEW |