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

Side by Side Diff: chrome/browser/android/webapps/webapp_registry.h

Issue 1776903002: Refactor BrowsingDataRemover to mock out WebappRegistry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use PostDelayedTask Created 4 years, 9 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/android/webapps/webapp_registry.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_WEBAPPS_WEBAPP_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_
6 #define CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 12
13 // WebappRegistry is the C++ counterpart of 13 // WebappRegistry is the C++ counterpart of
14 // org.chromium.chrome.browser.webapp's WebappRegistry in Java. 14 // org.chromium.chrome.browser.webapp's WebappRegistry in Java.
15 // All methods in this class which make JNI calls should be declared virtual and
16 // mocked out in C++ unit tests. The JNI call cannot be made in this environment
17 // as the Java side will not be initialised.
15 class WebappRegistry { 18 class WebappRegistry {
16 public: 19 public:
20 WebappRegistry() { }
21 virtual ~WebappRegistry() { }
22
17 // Registers JNI hooks. 23 // Registers JNI hooks.
18 static bool RegisterWebappRegistry(JNIEnv* env); 24 static bool RegisterWebappRegistry(JNIEnv* env);
19 25
20 // Cleans up data stored by web apps. 26 // Cleans up data stored by web apps.
21 static void UnregisterWebapps(const base::Closure& callback); 27 virtual void UnregisterWebapps(const base::Closure& callback);
22 28
23 private: 29 private:
24 ~WebappRegistry() = delete; 30 DISALLOW_COPY_AND_ASSIGN(WebappRegistry);
25
26 DISALLOW_IMPLICIT_CONSTRUCTORS(WebappRegistry);
27 }; 31 };
28 32
29 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ 33 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/webapps/webapp_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698