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

Side by Side Diff: chrome/browser/chromeos/display/display_preferences.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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
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/display/display_preferences.h" 5 #include "chrome/browser/chromeos/display/display_preferences.h"
6 6
7 #include "ash/display/display_layout_store.h" 7 #include "ash/display/display_layout_store.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/display/display_pref_util.h" 9 #include "ash/display/display_pref_util.h"
10 #include "ash/display/display_util.h" 10 #include "ash/display/display_util.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return "movie"; 73 return "movie";
74 case ui::COLOR_PROFILE_READING: 74 case ui::COLOR_PROFILE_READING:
75 return "reading"; 75 return "reading";
76 case ui::NUM_COLOR_PROFILES: 76 case ui::NUM_COLOR_PROFILES:
77 break; 77 break;
78 } 78 }
79 NOTREACHED(); 79 NOTREACHED();
80 return ""; 80 return "";
81 } 81 }
82 82
83 ui::ColorCalibrationProfile StringToColorProfile(std::string value) { 83 ui::ColorCalibrationProfile StringToColorProfile(const std::string& value) {
84 if (value == "standard") 84 if (value == "standard")
85 return ui::COLOR_PROFILE_STANDARD; 85 return ui::COLOR_PROFILE_STANDARD;
86 else if (value == "dynamic") 86 else if (value == "dynamic")
87 return ui::COLOR_PROFILE_DYNAMIC; 87 return ui::COLOR_PROFILE_DYNAMIC;
88 else if (value == "movie") 88 else if (value == "movie")
89 return ui::COLOR_PROFILE_MOVIE; 89 return ui::COLOR_PROFILE_MOVIE;
90 else if (value == "reading") 90 else if (value == "reading")
91 return ui::COLOR_PROFILE_READING; 91 return ui::COLOR_PROFILE_READING;
92 NOTREACHED(); 92 NOTREACHED();
93 return ui::COLOR_PROFILE_STANDARD; 93 return ui::COLOR_PROFILE_STANDARD;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 const ash::DisplayLayout& layout) { 397 const ash::DisplayLayout& layout) {
398 StoreDisplayLayoutPref(ash::CreateDisplayIdPair(id1, id2), layout); 398 StoreDisplayLayoutPref(ash::CreateDisplayIdPair(id1, id2), layout);
399 } 399 }
400 400
401 // Stores the given |power_state|. 401 // Stores the given |power_state|.
402 void StoreDisplayPowerStateForTest(DisplayPowerState power_state) { 402 void StoreDisplayPowerStateForTest(DisplayPowerState power_state) {
403 StoreDisplayPowerState(power_state); 403 StoreDisplayPowerState(power_state);
404 } 404 }
405 405
406 } // namespace chromeos 406 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698