summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run/first_run_unittest.cc
diff options
context:
space:
mode:
authorjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-28 23:07:21 +0000
committerjennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-28 23:07:21 +0000
commitdfa08b04cf8ee5a34972379f254061647313e2f0 (patch)
treef97fabbf58bded8170db33f41047e350b7006bd2 /chrome/browser/first_run/first_run_unittest.cc
parent7ccd66a1d36934f1034dfc8eb8583771c125ffd1 (diff)
downloadchromium_src-dfa08b04cf8ee5a34972379f254061647313e2f0.zip
chromium_src-dfa08b04cf8ee5a34972379f254061647313e2f0.tar.gz
chromium_src-dfa08b04cf8ee5a34972379f254061647313e2f0.tar.bz2
Refactor FirstRun class code into namespace first_run progressively. This cl refactors:
IsChromeFirstRun() CreateSentinel() RemoveSentinel() GetFirstRunSentinelFilePath() It also fixed an issue that chromeos first run won't create sentinel file, and the following runs always think it is a first run. BUG=108137 TEST=None Review URL: http://codereview.chromium.org/8989043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run/first_run_unittest.cc')
-rw-r--r--chrome/browser/first_run/first_run_unittest.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/first_run/first_run_unittest.cc b/chrome/browser/first_run/first_run_unittest.cc
index 6a32fe1..601416c 100644
--- a/chrome/browser/first_run/first_run_unittest.cc
+++ b/chrome/browser/first_run/first_run_unittest.cc
@@ -1,24 +1,25 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/file_util.h"
#include "chrome/browser/first_run/first_run.h"
+#include "chrome/browser/first_run/first_run_internal.h"
#include "testing/gtest/include/gtest/gtest.h"
class FirstRunTest : public testing::Test {
protected:
virtual void SetUp() {
- FirstRun::GetFirstRunSentinelFilePath(&sentinel_path_);
+ first_run::internal::GetFirstRunSentinelFilePath(&sentinel_path_);
}
FilePath sentinel_path_;
};
TEST_F(FirstRunTest, RemoveSentinel) {
- EXPECT_TRUE(FirstRun::CreateSentinel());
+ EXPECT_TRUE(first_run::CreateSentinel());
EXPECT_TRUE(file_util::PathExists(sentinel_path_));
- EXPECT_TRUE(FirstRun::RemoveSentinel());
+ EXPECT_TRUE(first_run::RemoveSentinel());
EXPECT_FALSE(file_util::PathExists(sentinel_path_));
}