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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2798623002: Use TaskScheduler::InitParams to initialize TaskScheduler in child processes. (Closed)
Patch Set: Created 3 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 | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/child/child_process.h » ('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) 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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 url::Replacements<char> r; 1512 url::Replacements<char> r;
1513 r.SetPath(path.c_str(), url::Component(0, path.length())); 1513 r.SetPath(path.c_str(), url::Component(0, path.length()));
1514 1514
1515 if (result == internal::NUM_PLUGIN_ERROR) 1515 if (result == internal::NUM_PLUGIN_ERROR)
1516 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; 1516 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS;
1517 1517
1518 RecordYouTubeRewriteUMA(result); 1518 RecordYouTubeRewriteUMA(result);
1519 return corrected_url.ReplaceComponents(r); 1519 return corrected_url.ReplaceComponents(r);
1520 } 1520 }
1521 1521
1522 void ChromeContentRendererClient::GetTaskSchedulerInitializationParams( 1522 std::unique_ptr<base::TaskScheduler::InitParams>
1523 std::vector<base::SchedulerWorkerPoolParams>* params_vector, 1523 ChromeContentRendererClient::GetTaskSchedulerInitParams() {
1524 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* 1524 return task_scheduler_util::
1525 index_to_traits_callback) { 1525 GetRendererTaskSchedulerInitParamsFromCommandLine();
1526 DCHECK(params_vector);
1527 DCHECK(index_to_traits_callback);
1528 // If this call fails, content will fall back to the default params.
1529 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams();
1530 *index_to_traits_callback =
1531 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits);
1532 } 1526 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/child/child_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698