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

Unified Diff: chrome/browser/chromeos/boot_times_loader.cc

Issue 5734002: Continuation of CL 5685007, rename the singleton accessor method in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 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/boot_times_loader.cc
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index 4f7b45f27c0536c6819a776acc9e078655198a5e..b40505707011d5f26b3895dfb41434ae8a82d3af 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -9,10 +9,10 @@
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
+#include "base/lazy_instance.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/process_util.h"
-#include "base/singleton.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
@@ -62,6 +62,9 @@ static const FilePath::CharType kLoginTimes[] = FPL("login-times-sent");
// Name of file collecting logout times.
static const char kLogoutTimes[] = "logout-times-sent";
+static base::LazyInstance<BootTimesLoader> g_boot_times_loader(
+ base::LINKER_INITIALIZED);
+
BootTimesLoader::BootTimesLoader()
: backend_(new Backend()),
have_registered_(false) {
@@ -71,7 +74,7 @@ BootTimesLoader::BootTimesLoader()
// static
BootTimesLoader* BootTimesLoader::Get() {
- return Singleton<BootTimesLoader>::get();
+ return g_boot_times_loader.Pointer();
}
BootTimesLoader::Handle BootTimesLoader::GetBootTimes(
@@ -373,7 +376,7 @@ void BootTimesLoader::Observe(
// Only log for first tab to render. Make sure this is only done once.
// If the network isn't connected we'll get a second LOAD_START once it is
// and the page is reloaded.
- if (NetworkStateNotifier::Get()->is_connected()) {
+ if (NetworkStateNotifier::GetInstance()->is_connected()) {
// Post difference between first tab and login success time.
AddLoginTimeMarker("LoginDone", true);
RecordCurrentStats(kChromeFirstRender);

Powered by Google App Engine
This is Rietveld 408576698