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

Side by Side Diff: chrome/browser/google/google_brand_chromeos.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
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/io_thread.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/task_scheduler/post_task.h" 10 #include "base/task_scheduler/post_task.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ::chromeos::system::StatisticsProvider::GetInstance(); 68 ::chromeos::system::StatisticsProvider::GetInstance();
69 std::string brand; 69 std::string brand;
70 const bool found = provider->GetMachineStatistic( 70 const bool found = provider->GetMachineStatistic(
71 ::chromeos::system::kRlzBrandCodeKey, &brand); 71 ::chromeos::system::kRlzBrandCodeKey, &brand);
72 if (found && !brand.empty()) { 72 if (found && !brand.empty()) {
73 SetBrand(callback, brand); 73 SetBrand(callback, brand);
74 return; 74 return;
75 } 75 }
76 76
77 base::PostTaskWithTraitsAndReplyWithResult( 77 base::PostTaskWithTraitsAndReplyWithResult(
78 FROM_HERE, base::TaskTraits() 78 FROM_HERE,
79 .WithShutdownBehavior( 79 {base::MayBlock(), base::TaskPriority::BACKGROUND,
80 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) 80 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
81 .WithPriority(base::TaskPriority::BACKGROUND)
82 .MayBlock(),
83 base::Bind(&ReadBrandFromFile), base::Bind(&SetBrand, callback)); 81 base::Bind(&ReadBrandFromFile), base::Bind(&SetBrand, callback));
84 } 82 }
85 83
86 } // namespace chromeos 84 } // namespace chromeos
87 } // namespace google_brand 85 } // namespace google_brand
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698