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

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

Issue 2749303002: [reference - do not submit] Always create four pools in TaskSchedulerImpl. (Closed)
Patch Set: rebase Created 3 years, 9 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/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 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 url::Replacements<char> r; 1505 url::Replacements<char> r;
1506 r.SetPath(path.c_str(), url::Component(0, path.length())); 1506 r.SetPath(path.c_str(), url::Component(0, path.length()));
1507 1507
1508 if (result == internal::NUM_PLUGIN_ERROR) 1508 if (result == internal::NUM_PLUGIN_ERROR)
1509 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; 1509 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS;
1510 1510
1511 RecordYouTubeRewriteUMA(result); 1511 RecordYouTubeRewriteUMA(result);
1512 return corrected_url.ReplaceComponents(r); 1512 return corrected_url.ReplaceComponents(r);
1513 } 1513 }
1514 1514
1515 void ChromeContentRendererClient::GetTaskSchedulerInitializationParams( 1515 std::unique_ptr<base::TaskSchedulerInitParams>
1516 std::vector<base::SchedulerWorkerPoolParams>* params_vector, 1516 ChromeContentRendererClient::GetTaskSchedulerInitParams() {
1517 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* 1517 return task_scheduler_util::
1518 index_to_traits_callback) { 1518 GetRendererTaskSchedulerInitParamsFromCommandLine();
1519 DCHECK(params_vector);
1520 DCHECK(index_to_traits_callback);
1521 // If this call fails, content will fall back to the default params.
1522 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams();
1523 *index_to_traits_callback =
1524 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits);
1525 } 1519 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | components/task_scheduler_util/browser/initialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698