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

Unified Diff: chrome/browser/after_startup_task_utils.h

Issue 1456703003: AfterStartupTask: Use ForTesting() method rather than friends. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/after_startup_task_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/after_startup_task_utils.h
diff --git a/chrome/browser/after_startup_task_utils.h b/chrome/browser/after_startup_task_utils.h
index 967de140caf7df2c0728cfbe0dd211d9cbf3ec15..835767000332925d7959324eb48f4fc5ef509f4d 100644
--- a/chrome/browser/after_startup_task_utils.h
+++ b/chrome/browser/after_startup_task_utils.h
@@ -7,11 +7,8 @@
#include "base/basictypes.h"
#include "base/bind.h"
-#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
-class ExtensionServiceTest;
-
namespace android {
class AfterStartupTaskUtilsJNI;
}
@@ -40,16 +37,19 @@ class AfterStartupTaskUtils {
// PostTask() API instead.
static bool IsBrowserStartupComplete();
+ // For use by unit tests where we don't have normal content loading
+ // infrastructure and thus StartMonitoringStartup() is unsuitable.
+ static void SetBrowserStartupIsCompleteForTesting();
+
+ static void UnsafeResetForTesting();
+
private:
- friend class AfterStartupTaskTest;
+ // TODO(wkorman): Look into why Android calls
+ // SetBrowserStartupIsComplete() directly. Ideally it would use
+ // StartMonitoringStartup() as the normal approach.
friend class android::AfterStartupTaskUtilsJNI;
- friend class ::ExtensionServiceTest;
- friend class InProcessBrowserTest;
- FRIEND_TEST_ALL_PREFIXES(AfterStartupTaskTest, IsStartupComplete);
- FRIEND_TEST_ALL_PREFIXES(AfterStartupTaskTest, PostTask);
static void SetBrowserStartupIsComplete();
- static void UnsafeResetForTesting();
DISALLOW_IMPLICIT_CONSTRUCTORS(AfterStartupTaskUtils);
};
« no previous file with comments | « no previous file | chrome/browser/after_startup_task_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698