| OLD | NEW |
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, base::TaskTraits() |
| 79 .WithShutdownBehavior( | 79 .WithShutdownBehavior( |
| 80 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) | 80 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) |
| 81 .WithPriority(base::TaskPriority::BACKGROUND) | 81 .WithPriority(base::TaskPriority::BACKGROUND) |
| 82 .WithFileIO(), | 82 .MayBlock(), |
| 83 base::Bind(&ReadBrandFromFile), base::Bind(&SetBrand, callback)); | 83 base::Bind(&ReadBrandFromFile), base::Bind(&SetBrand, callback)); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace chromeos | 86 } // namespace chromeos |
| 87 } // namespace google_brand | 87 } // namespace google_brand |
| OLD | NEW |