Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: chrome/browser/chromeos/login/helper.cc

Issue 10837142: Remove --load-2x-resources flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698