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

Side by Side Diff: chrome/browser/android/provider/blocking_ui_thread_async_request.h

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 #ifndef CHROME_BROWSER_ANDROID_PROVIDER_BLOCKING_UI_THREAD_ASYNC_REQUEST_H_ 5 #ifndef CHROME_BROWSER_ANDROID_PROVIDER_BLOCKING_UI_THREAD_ASYNC_REQUEST_H_
6 #define CHROME_BROWSER_ANDROID_PROVIDER_BLOCKING_UI_THREAD_ASYNC_REQUEST_H_ 6 #define CHROME_BROWSER_ANDROID_PROVIDER_BLOCKING_UI_THREAD_ASYNC_REQUEST_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h"
10 #include "base/synchronization/waitable_event.h" 11 #include "base/synchronization/waitable_event.h"
11 #include "chrome/browser/android/provider/run_on_ui_thread_blocking.h" 12 #include "chrome/browser/android/provider/run_on_ui_thread_blocking.h"
12 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
13 14
14 // Allows making async requests and blocking the current thread until the 15 // Allows making async requests and blocking the current thread until the
15 // response arrives. The request is performed in the UI thread. 16 // response arrives. The request is performed in the UI thread.
16 // Users of this class MUST call RequestCompleted when receiving the response. 17 // Users of this class MUST call RequestCompleted when receiving the response.
17 // Cannot be called directly from the UI thread. 18 // Cannot be called directly from the UI thread.
18 class BlockingUIThreadAsyncRequest { 19 class BlockingUIThreadAsyncRequest {
19 public: 20 public:
(...skipping 26 matching lines...) Expand all
46 static void RunRequestOnUIThread(base::Callback<Signature> request) { 47 static void RunRequestOnUIThread(base::Callback<Signature> request) {
47 request.Run(); 48 request.Run();
48 } 49 }
49 50
50 base::WaitableEvent request_completed_; 51 base::WaitableEvent request_completed_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(BlockingUIThreadAsyncRequest); 53 DISALLOW_COPY_AND_ASSIGN(BlockingUIThreadAsyncRequest);
53 }; 54 };
54 55
55 #endif // CHROME_BROWSER_ANDROID_PROVIDER_BLOCKING_UI_THREAD_ASYNC_REQUEST_H_ 56 #endif // CHROME_BROWSER_ANDROID_PROVIDER_BLOCKING_UI_THREAD_ASYNC_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698