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

Unified Diff: chrome/browser/chromeos/login/login_utils_browsertest.cc

Issue 11506006: [cros] RLZ tracking can be turned off via a flag file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-apply ps#16, it got lost Created 8 years 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
Index: chrome/browser/chromeos/login/login_utils_browsertest.cc
diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc
index ab90a32f1725503624e06f832e8454337ee39e56..1aa95dcd76c6acc43ee53aadef7d45feb4872453 100644
--- a/chrome/browser/chromeos/login/login_utils_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc
@@ -28,6 +28,7 @@
#include "chrome/browser/policy/policy_service.h"
#include "chrome/browser/policy/proto/device_management_backend.pb.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/rlz/rlz.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -50,6 +51,10 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(ENABLE_RLZ)
+#include "rlz/lib/rlz_value_store.h"
+#endif
+
namespace chromeos {
namespace {
@@ -264,6 +269,11 @@ class LoginUtilsTest : public testing::Test,
NULL, NULL));
browser_process_->SetIOThread(io_thread_state_.get());
+#if defined(ENABLE_RLZ)
+ rlz_lib::testing::SetRlzStoreDirectory(scoped_temp_dir_.path());
+ RLZTracker::EnableZeroDelayForTesting();
+#endif
+
RunUntilIdle();
}
@@ -276,6 +286,9 @@ class LoginUtilsTest : public testing::Test,
InvokeOnIO(
base::Bind(&LoginUtilsTest::TearDownOnIO, base::Unretained(this)));
+ // LoginUtils instance must not outlive Profile instances.
+ LoginUtils::Set(NULL);
+
// These trigger some tasks that have to run while BrowserThread::UI
// exists. Delete all the profiles before deleting the connector.
browser_process_->SetProfileManager(NULL);

Powered by Google App Engine
This is Rietveld 408576698