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

Side by Side Diff: chrome/browser/chromeos/base/locale_util.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/chromeos/base/locale_util.h" 5 #include "chrome/browser/chromeos/base/locale_util.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/task_scheduler/post_task.h" 10 #include "base/task_scheduler/post_task.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 const bool login_layouts_only, 117 const bool login_layouts_only,
118 const SwitchLanguageCallback& callback, 118 const SwitchLanguageCallback& callback,
119 Profile* profile) { 119 Profile* profile) {
120 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 120 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
121 std::unique_ptr<SwitchLanguageData> data( 121 std::unique_ptr<SwitchLanguageData> data(
122 new SwitchLanguageData(locale, enable_locale_keyboard_layouts, 122 new SwitchLanguageData(locale, enable_locale_keyboard_layouts,
123 login_layouts_only, callback, profile)); 123 login_layouts_only, callback, profile));
124 base::Closure reloader( 124 base::Closure reloader(
125 base::Bind(&SwitchLanguageDoReloadLocale, base::Unretained(data.get()))); 125 base::Bind(&SwitchLanguageDoReloadLocale, base::Unretained(data.get())));
126 base::PostTaskWithTraitsAndReply( 126 base::PostTaskWithTraitsAndReply(
127 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( 127 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, reloader,
128 base::TaskPriority::BACKGROUND),
129 reloader,
130 base::Bind(&FinishSwitchLanguage, base::Passed(std::move(data)))); 128 base::Bind(&FinishSwitchLanguage, base::Passed(std::move(data))));
131 } 129 }
132 130
133 } // namespace locale_util 131 } // namespace locale_util
134 } // namespace chromeos 132 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/base/file_flusher.cc ('k') | chrome/browser/chromeos/boot_times_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698