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

Unified Diff: ash/display/display_pref_util.h

Issue 2733313002: Move display preference code from ash/display/ to ui/display/manager/. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/BUILD.gn ('k') | ash/display/json_converter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_pref_util.h
diff --git a/ash/display/display_pref_util.h b/ash/display/display_pref_util.h
deleted file mode 100644
index aae59a958947c2034aa6fef18fa335970d177425..0000000000000000000000000000000000000000
--- a/ash/display/display_pref_util.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ASH_DISPLAY_DISPLAY_PREF_UTIL_H
-#define ASH_DISPLAY_DISPLAY_PREF_UTIL_H
-
-#include <map>
-#include <string>
-
-#include "base/strings/string_piece.h"
-
-namespace ash {
-
-// Utility templates to create enum to string map and
-// a function to find an enum value from a string.
-template <typename T>
-std::map<T, std::string>* CreateToStringMap(T k1,
- const std::string& v1,
- T k2,
- const std::string& v2,
- T k3,
- const std::string& v3,
- T k4,
- const std::string& v4) {
- std::map<T, std::string>* map = new std::map<T, std::string>();
- (*map)[k1] = v1;
- (*map)[k2] = v2;
- (*map)[k3] = v3;
- (*map)[k4] = v4;
- return map;
-}
-
-template <typename T>
-std::map<T, std::string>* CreateToStringMap(T k1,
- const std::string& v1,
- T k2,
- const std::string& v2,
- T k3,
- const std::string& v3) {
- std::map<T, std::string>* map = new std::map<T, std::string>();
- (*map)[k1] = v1;
- (*map)[k2] = v2;
- (*map)[k3] = v3;
- return map;
-}
-
-template <typename T>
-bool ReverseFind(const std::map<T, std::string>* map,
- const base::StringPiece& value,
- T* key) {
- typename std::map<T, std::string>::const_iterator iter = map->begin();
- for (; iter != map->end(); ++iter) {
- if (iter->second == value) {
- *key = iter->first;
- return true;
- }
- }
- return false;
-}
-
-} // namespace ash
-
-#endif // ASH_DISPLAY_DISPLAY_PREF_UTIL_H
« no previous file with comments | « ash/BUILD.gn ('k') | ash/display/json_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698