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

Side by Side Diff: chrome/browser/chromeos/extensions/default_app_order.cc

Issue 2056493002: clang-tidy WaitableEvent refactor (ChromeOS side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | chrome/browser/chromeos/login/signin/oauth2_browsertest.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 (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/browser/chromeos/extensions/default_app_order.h" 5 #include "chrome/browser/chromeos/extensions/default_app_order.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void GetDefault(std::vector<std::string>* app_ids) { 114 void GetDefault(std::vector<std::string>* app_ids) {
115 for (size_t i = 0; i < arraysize(kDefaultAppOrder); ++i) 115 for (size_t i = 0; i < arraysize(kDefaultAppOrder); ++i)
116 app_ids->push_back(std::string(kDefaultAppOrder[i])); 116 app_ids->push_back(std::string(kDefaultAppOrder[i]));
117 } 117 }
118 118
119 } // namespace 119 } // namespace
120 120
121 const size_t kDefaultAppOrderCount = arraysize(kDefaultAppOrder); 121 const size_t kDefaultAppOrderCount = arraysize(kDefaultAppOrder);
122 122
123 ExternalLoader::ExternalLoader(bool async) 123 ExternalLoader::ExternalLoader(bool async)
124 : loaded_(true /* manual_rest */, false /* initially_signaled */) { 124 : loaded_(base::WaitableEvent::ResetPolicy::MANUAL,
125 base::WaitableEvent::InitialState::NOT_SIGNALED) {
125 DCHECK(!loader_instance); 126 DCHECK(!loader_instance);
126 loader_instance = this; 127 loader_instance = this;
127 128
128 if (async) { 129 if (async) {
129 content::BrowserThread::PostBlockingPoolTask(FROM_HERE, 130 content::BrowserThread::PostBlockingPoolTask(FROM_HERE,
130 base::Bind(&ExternalLoader::Load, base::Unretained(this))); 131 base::Bind(&ExternalLoader::Load, base::Unretained(this)));
131 } else { 132 } else {
132 Load(); 133 Load();
133 } 134 }
134 } 135 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 std::string GetOemAppsFolderName() { 199 std::string GetOemAppsFolderName() {
199 // |loader_instance| could be NULL for test. 200 // |loader_instance| could be NULL for test.
200 if (!loader_instance) 201 if (!loader_instance)
201 return std::string(); 202 return std::string();
202 else 203 else
203 return loader_instance->GetOemAppsFolderName(); 204 return loader_instance->GetOemAppsFolderName();
204 } 205 }
205 206
206 } // namespace default_app_order 207 } // namespace default_app_order
207 } // namespace chromeos 208 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/signin/oauth2_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698