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

Side by Side Diff: gpu/config/gpu_control_list.cc

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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
« no previous file with comments | « gpu/config/gpu_control_list.h ('k') | gpu/config/gpu_control_list_entry_unittest.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "gpu/config/gpu_control_list.h" 5 #include "gpu/config/gpu_control_list.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/cpu.h" 10 #include "base/cpu.h"
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 control_list_logging_enabled_(false) { 1356 control_list_logging_enabled_(false) {
1357 } 1357 }
1358 1358
1359 GpuControlList::~GpuControlList() { 1359 GpuControlList::~GpuControlList() {
1360 Clear(); 1360 Clear();
1361 } 1361 }
1362 1362
1363 bool GpuControlList::LoadList( 1363 bool GpuControlList::LoadList(
1364 const std::string& json_context, 1364 const std::string& json_context,
1365 GpuControlList::OsFilter os_filter) { 1365 GpuControlList::OsFilter os_filter) {
1366 scoped_ptr<base::Value> root = base::JSONReader::Read(json_context); 1366 std::unique_ptr<base::Value> root = base::JSONReader::Read(json_context);
1367 if (root.get() == NULL || !root->IsType(base::Value::TYPE_DICTIONARY)) 1367 if (root.get() == NULL || !root->IsType(base::Value::TYPE_DICTIONARY))
1368 return false; 1368 return false;
1369 1369
1370 base::DictionaryValue* root_dictionary = 1370 base::DictionaryValue* root_dictionary =
1371 static_cast<base::DictionaryValue*>(root.get()); 1371 static_cast<base::DictionaryValue*>(root.get());
1372 DCHECK(root_dictionary); 1372 DCHECK(root_dictionary);
1373 return LoadList(*root_dictionary, os_filter); 1373 return LoadList(*root_dictionary, os_filter);
1374 } 1374 }
1375 1375
1376 bool GpuControlList::LoadList(const base::DictionaryValue& parsed_json, 1376 bool GpuControlList::LoadList(const base::DictionaryValue& parsed_json,
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 const std::string& feature_name, int feature_id) { 1585 const std::string& feature_name, int feature_id) {
1586 feature_map_[feature_name] = feature_id; 1586 feature_map_[feature_name] = feature_id;
1587 } 1587 }
1588 1588
1589 void GpuControlList::set_supports_feature_type_all(bool supported) { 1589 void GpuControlList::set_supports_feature_type_all(bool supported) {
1590 supports_feature_type_all_ = supported; 1590 supports_feature_type_all_ = supported;
1591 } 1591 }
1592 1592
1593 } // namespace gpu 1593 } // namespace gpu
1594 1594
OLDNEW
« no previous file with comments | « gpu/config/gpu_control_list.h ('k') | gpu/config/gpu_control_list_entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698