| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/image_downloader.h" | 5 #include "chrome/browser/chromeos/login/image_downloader.h" |
| 6 | 6 |
| 7 #include <vector> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 9 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 10 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
| 11 #include "chrome/browser/browser_process.h" | |
| 12 #include "chrome/browser/browser_thread.h" | 13 #include "chrome/browser/browser_thread.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/common/net/url_fetcher.h" | 15 #include "chrome/common/net/url_fetcher.h" |
| 15 | 16 |
| 16 namespace chromeos { | 17 namespace chromeos { |
| 17 | 18 |
| 18 namespace { | 19 namespace { |
| 19 | 20 |
| 20 // Template for optional authorization header. | 21 // Template for optional authorization header. |
| 21 const char kAuthorizationHeader[] = "Authorization: GoogleLogin auth=%s"; | 22 const char kAuthorizationHeader[] = "Authorization: GoogleLogin auth=%s"; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 55 |
| 55 VLOG(1) << "Decoding the image..."; | 56 VLOG(1) << "Decoding the image..."; |
| 56 std::vector<unsigned char> image_data(data.begin(), data.end()); | 57 std::vector<unsigned char> image_data(data.begin(), data.end()); |
| 57 scoped_refptr<ImageDecoder> image_decoder = new ImageDecoder(delegate_, | 58 scoped_refptr<ImageDecoder> image_decoder = new ImageDecoder(delegate_, |
| 58 image_data); | 59 image_data); |
| 59 image_decoder->Start(); | 60 image_decoder->Start(); |
| 60 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 61 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 61 } | 62 } |
| 62 | 63 |
| 63 } // namespace chromeos | 64 } // namespace chromeos |
| 64 | |
| OLD | NEW |