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

Side by Side Diff: chrome/browser/extensions/requirements_checker_browsertest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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
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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 " \"features\": [\"" + base::JoinString(features, "\", \"") + "\"]\n" 69 " \"features\": [\"" + base::JoinString(features, "\", \"") + "\"]\n"
70 " }\n" 70 " }\n"
71 " ]\n" 71 " ]\n"
72 "}"; 72 "}";
73 gpu::GPUInfo gpu_info; 73 gpu::GPUInfo gpu_info;
74 content::GpuDataManager::GetInstance()->InitializeForTesting( 74 content::GpuDataManager::GetInstance()->InitializeForTesting(
75 json_blacklist, gpu_info); 75 json_blacklist, gpu_info);
76 } 76 }
77 77
78 protected: 78 protected:
79 scoped_ptr<RequirementsChecker> checker_; 79 std::unique_ptr<RequirementsChecker> checker_;
80 }; 80 };
81 81
82 IN_PROC_BROWSER_TEST_F(RequirementsCheckerBrowserTest, CheckEmptyExtension) { 82 IN_PROC_BROWSER_TEST_F(RequirementsCheckerBrowserTest, CheckEmptyExtension) {
83 scoped_refptr<const Extension> extension( 83 scoped_refptr<const Extension> extension(
84 LoadExtensionFromDirName("no_requirements")); 84 LoadExtensionFromDirName("no_requirements"));
85 ASSERT_TRUE(extension.get()); 85 ASSERT_TRUE(extension.get());
86 checker_->Check(extension, base::Bind( 86 checker_->Check(extension, base::Bind(
87 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, 87 &RequirementsCheckerBrowserTest::ValidateRequirementErrors,
88 base::Unretained(this), std::vector<std::string>())); 88 base::Unretained(this), std::vector<std::string>()));
89 content::RunAllBlockingPoolTasksUntilIdle(); 89 content::RunAllBlockingPoolTasksUntilIdle();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); 157 IDS_EXTENSION_WEBGL_NOT_SUPPORTED));
158 } 158 }
159 159
160 checker_->Check(extension, base::Bind( 160 checker_->Check(extension, base::Bind(
161 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, 161 &RequirementsCheckerBrowserTest::ValidateRequirementErrors,
162 base::Unretained(this), expected_errors)); 162 base::Unretained(this), expected_errors));
163 content::RunAllBlockingPoolTasksUntilIdle(); 163 content::RunAllBlockingPoolTasksUntilIdle();
164 } 164 }
165 165
166 } // namespace extensions 166 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/process_manager_browsertest.cc ('k') | chrome/browser/extensions/scripting_permissions_modifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698