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

Side by Side Diff: chrome/browser/android/precache/precache_launcher.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 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 #ifndef CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_
6 #define CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_ 6 #define CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/android/jni_weak_ref.h" 11 #include "base/android/jni_weak_ref.h"
12 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
13 14
14 class PrecacheLauncher { 15 class PrecacheLauncher {
15 public: 16 public:
16 PrecacheLauncher(JNIEnv* env, jobject obj); 17 PrecacheLauncher(JNIEnv* env, jobject obj);
17 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 18 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
18 void Start(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 19 void Start(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
19 void Cancel(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 20 void Cancel(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
20 21
21 private: 22 private:
22 ~PrecacheLauncher(); 23 ~PrecacheLauncher();
23 // Called when precaching completes. |try_again_soon| is true iff the precache 24 // Called when precaching completes. |try_again_soon| is true iff the precache
24 // failed to start due to a transient error and should be attempted again 25 // failed to start due to a transient error and should be attempted again
25 // soon. 26 // soon.
26 void OnPrecacheCompleted(bool try_again_soon); 27 void OnPrecacheCompleted(bool try_again_soon);
27 28
28 JavaObjectWeakGlobalRef weak_java_precache_launcher_; 29 JavaObjectWeakGlobalRef weak_java_precache_launcher_;
29 30
30 // This must be the last member field in the class. 31 // This must be the last member field in the class.
31 base::WeakPtrFactory<PrecacheLauncher> weak_factory_; 32 base::WeakPtrFactory<PrecacheLauncher> weak_factory_;
32 33
33 DISALLOW_COPY_AND_ASSIGN(PrecacheLauncher); 34 DISALLOW_COPY_AND_ASSIGN(PrecacheLauncher);
34 }; 35 };
35 36
36 // Registers the native methods to be called from Java. 37 // Registers the native methods to be called from Java.
37 bool RegisterPrecacheLauncher(JNIEnv* env); 38 bool RegisterPrecacheLauncher(JNIEnv* env);
38 39
39 #endif // CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_ 40 #endif // CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/popular_sites.cc ('k') | chrome/browser/android/preferences/pref_service_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698