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/prefs/pref_service.h" | |
15 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
16 #include "base/threading/worker_pool.h" | 15 #include "base/threading/worker_pool.h" |
17 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" | 17 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" |
19 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 18 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
20 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
22 #include "chrome/common/extensions/extension_constants.h" | 21 #include "chrome/common/extensions/extension_constants.h" |
23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 23 #include "components/prefs/pref_service.h" |
24 #include "components/user_manager/user.h" | 24 #include "components/user_manager/user.h" |
25 #include "components/user_manager/user_manager.h" | 25 #include "components/user_manager/user_manager.h" |
26 #include "components/wallpaper/wallpaper_layout.h" | 26 #include "components/wallpaper/wallpaper_layout.h" |
27 #include "extensions/browser/event_router.h" | 27 #include "extensions/browser/event_router.h" |
28 #include "net/base/load_flags.h" | 28 #include "net/base/load_flags.h" |
29 #include "net/http/http_status_code.h" | 29 #include "net/http/http_status_code.h" |
30 #include "net/url_request/url_fetcher.h" | 30 #include "net/url_request/url_fetcher.h" |
31 #include "net/url_request/url_fetcher_delegate.h" | 31 #include "net/url_request/url_fetcher_delegate.h" |
32 #include "url/gurl.h" | 32 #include "url/gurl.h" |
33 | 33 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 const std::string& response) { | 240 const std::string& response) { |
241 if (success) { | 241 if (success) { |
242 params_->details.data.reset( | 242 params_->details.data.reset( |
243 new std::vector<char>(response.begin(), response.end())); | 243 new std::vector<char>(response.begin(), response.end())); |
244 StartDecode(*params_->details.data); | 244 StartDecode(*params_->details.data); |
245 } else { | 245 } else { |
246 SetError(response); | 246 SetError(response); |
247 SendResponse(false); | 247 SendResponse(false); |
248 } | 248 } |
249 } | 249 } |
OLD | NEW |