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

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

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 7 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/extensions/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 std::vector<base::FilePath::StringType> components; 94 std::vector<base::FilePath::StringType> components;
95 relative_path.GetComponents(&components); 95 relative_path.GetComponents(&components);
96 DCHECK_GT(components.size(), 1u); 96 DCHECK_GT(components.size(), 1u);
97 base::FilePath resource_path = test_dir_root; 97 base::FilePath resource_path = test_dir_root;
98 for (size_t i = 1u; i < components.size(); ++i) 98 for (size_t i = 1u; i < components.size(); ++i)
99 resource_path = resource_path.Append(components[i]); 99 resource_path = resource_path.Append(components[i]);
100 100
101 return new net::URLRequestFileJob( 101 return new net::URLRequestFileJob(
102 request, network_delegate, resource_path, 102 request, network_delegate, resource_path,
103 base::CreateTaskRunnerWithTraits( 103 base::CreateTaskRunnerWithTraits(
104 base::TaskTraits() 104 {base::MayBlock(), base::TaskPriority::BACKGROUND,
105 .MayBlock() 105 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}));
106 .WithPriority(base::TaskPriority::BACKGROUND)
107 .WithShutdownBehavior(
108 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)));
109 } 106 }
110 107
111 } // namespace 108 } // namespace
112 109
113 ExtensionBrowserTest::ExtensionBrowserTest() 110 ExtensionBrowserTest::ExtensionBrowserTest()
114 : loaded_(false), 111 : loaded_(false),
115 installed_(false), 112 installed_(false),
116 #if defined(OS_CHROMEOS) 113 #if defined(OS_CHROMEOS)
117 set_chromeos_user_(true), 114 set_chromeos_user_(true),
118 #endif 115 #endif
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( 609 return extensions::browsertest_util::ExecuteScriptInBackgroundPage(
613 profile(), extension_id, script); 610 profile(), extension_id, script);
614 } 611 }
615 612
616 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( 613 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait(
617 const std::string& extension_id, 614 const std::string& extension_id,
618 const std::string& script) { 615 const std::string& script) {
619 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( 616 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait(
620 profile(), extension_id, script); 617 profile(), extension_id, script);
621 } 618 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_url_request_util.cc ('k') | chrome/browser/extensions/extension_disabled_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698