Chromium Code Reviews| 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)) | |
|
pkotwicz
2012/08/07 16:04:58
Aren't you losing functionality here?
flackr
2012/08/07 18:05:41
Yes, I was presuming that we would use the above s
| |
| 115 return 2 * kBaseUserImageSize; | |
| 116 return kBaseUserImageSize; | 114 return kBaseUserImageSize; |
| 117 } | 115 } |
| 118 | 116 |
| 119 } // namespace chromeos | 117 } // namespace chromeos |
| OLD | NEW |