| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/gpu_blacklist.h" | 5 #include "content/browser/gpu_blacklist.h" |
| 6 | 6 |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
| 11 #include "base/string_split.h" | 11 #include "base/string_split.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
| 14 #include "base/sys_info.h" | 14 #include "base/sys_info.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "base/version.h" | 16 #include "base/version.h" |
| 17 #include "chrome/common/gpu_info.h" | 17 #include "content/common/gpu_info.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Encode a date as Version, where [0] is year, [1] is month, and [2] is day. | 21 // Encode a date as Version, where [0] is year, [1] is month, and [2] is day. |
| 22 Version* GetDateFromString(const std::string& date_string) { | 22 Version* GetDateFromString(const std::string& date_string) { |
| 23 // TODO(zmo): verify if in Windows registry, driver dates are always in the | 23 // TODO(zmo): verify if in Windows registry, driver dates are always in the |
| 24 // format of "mm-dd-yyyy". | 24 // format of "mm-dd-yyyy". |
| 25 std::vector<std::string> pieces; | 25 std::vector<std::string> pieces; |
| 26 base::SplitString(date_string, '-', &pieces); | 26 base::SplitString(date_string, '-', &pieces); |
| 27 if (pieces.size() != 3) | 27 if (pieces.size() != 3) |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 #endif | 753 #endif |
| 754 } | 754 } |
| 755 | 755 |
| 756 void GpuBlacklist::Clear() { | 756 void GpuBlacklist::Clear() { |
| 757 for (size_t i = 0; i < blacklist_.size(); ++i) | 757 for (size_t i = 0; i < blacklist_.size(); ++i) |
| 758 delete blacklist_[i]; | 758 delete blacklist_[i]; |
| 759 blacklist_.clear(); | 759 blacklist_.clear(); |
| 760 active_entries_.clear(); | 760 active_entries_.clear(); |
| 761 } | 761 } |
| 762 | 762 |
| OLD | NEW |