| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/helper.h" | 5 #include "chrome/browser/chromeos/login/helper.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/chromeos/cros/network_library.h" | 10 #include "chrome/browser/chromeos/cros/network_library.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 | 106 |
| 107 int GetCurrentUserImageSize() { | 107 int GetCurrentUserImageSize() { |
| 108 // The biggest size that the profile picture is displayed at is currently | 108 // The biggest size that the profile picture is displayed at is currently |
| 109 // 220px, used for the big preview on OOBE and Change Picture options page. | 109 // 220px, used for the big preview on OOBE and Change Picture options page. |
| 110 static const int kBaseUserImageSize = 220; | 110 static const int kBaseUserImageSize = 220; |
| 111 float scale_factor = gfx::Display::GetForcedDeviceScaleFactor(); | 111 float scale_factor = gfx::Display::GetForcedDeviceScaleFactor(); |
| 112 if (scale_factor > 1.0f) | 112 if (scale_factor > 1.0f) |
| 113 return static_cast<int>(scale_factor * kBaseUserImageSize); | 113 return static_cast<int>(scale_factor * kBaseUserImageSize); |
| 114 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoad2xResources)) | 114 // TODO(flackr): ChromeOS currently supports up to 2x, however this should use |
| 115 return 2 * kBaseUserImageSize; | 115 // the largest supported scale factor once |
| 116 return kBaseUserImageSize; | 116 // http://codereview.chromium.org/10828052/ lands. |
| 117 return 2 * kBaseUserImageSize; |
| 117 } | 118 } |
| 118 | 119 |
| 119 } // namespace chromeos | 120 } // namespace chromeos |
| OLD | NEW |