OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/profile_image_downloader.h" | 5 #include "chrome/browser/chromeos/login/profile_image_downloader.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/notification_details.h" | 23 #include "content/public/browser/notification_details.h" |
24 #include "content/public/browser/notification_observer.h" | 24 #include "content/public/browser/notification_observer.h" |
25 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
26 #include "content/public/browser/notification_source.h" | 26 #include "content/public/browser/notification_source.h" |
27 #include "content/public/browser/notification_types.h" | 27 #include "content/public/browser/notification_types.h" |
28 #include "content/public/common/url_fetcher.h" | 28 #include "content/public/common/url_fetcher.h" |
29 #include "googleurl/src/gurl.h" | 29 #include "googleurl/src/gurl.h" |
30 #include "skia/ext/image_operations.h" | 30 #include "skia/ext/image_operations.h" |
31 | 31 |
| 32 using content::BrowserThread; |
| 33 |
32 namespace chromeos { | 34 namespace chromeos { |
33 | 35 |
34 namespace { | 36 namespace { |
35 | 37 |
36 // Template for optional authorization header. | 38 // Template for optional authorization header. |
37 const char kAuthorizationHeader[] = "Authorization: GoogleLogin auth=%s"; | 39 const char kAuthorizationHeader[] = "Authorization: GoogleLogin auth=%s"; |
38 | 40 |
39 // URL requesting Picasa API for user info. | 41 // URL requesting Picasa API for user info. |
40 const char kUserEntryURL[] = | 42 const char kUserEntryURL[] = |
41 "http://picasaweb.google.com/data/entry/api/user/default?alt=json"; | 43 "http://picasaweb.google.com/data/entry/api/user/default?alt=json"; |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 } else { | 281 } else { |
280 if (token_details->service() == GaiaConstants::kPicasaService) { | 282 if (token_details->service() == GaiaConstants::kPicasaService) { |
281 LOG(WARNING) << "ProfileImageDownloader: token request failed"; | 283 LOG(WARNING) << "ProfileImageDownloader: token request failed"; |
282 if (delegate_) | 284 if (delegate_) |
283 delegate_->OnDownloadFailure(); | 285 delegate_->OnDownloadFailure(); |
284 } | 286 } |
285 } | 287 } |
286 } | 288 } |
287 | 289 |
288 } // namespace chromeos | 290 } // namespace chromeos |
OLD | NEW |