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

Side by Side Diff: components/rlz/rlz_tracker.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work 5 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work
6 // with or without the DLL being present. If the DLL is not present the 6 // with or without the DLL being present. If the DLL is not present the
7 // functions do nothing and just return false. 7 // functions do nothing and just return false.
8 8
9 #include "components/rlz/rlz_tracker.h" 9 #include "components/rlz/rlz_tracker.h"
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 brand.c_str(), referral_ascii.c_str(), 143 brand.c_str(), referral_ascii.c_str(),
144 lang_ascii.c_str(), false, true); 144 lang_ascii.c_str(), false, true);
145 } 145 }
146 146
147 } // namespace 147 } // namespace
148 148
149 RLZTracker* RLZTracker::tracker_ = nullptr; 149 RLZTracker* RLZTracker::tracker_ = nullptr;
150 150
151 // static 151 // static
152 RLZTracker* RLZTracker::GetInstance() { 152 RLZTracker* RLZTracker::GetInstance() {
153 return tracker_ ? tracker_ : Singleton<RLZTracker>::get(); 153 return tracker_ ? tracker_ : base::Singleton<RLZTracker>::get();
154 } 154 }
155 155
156 RLZTracker::RLZTracker() 156 RLZTracker::RLZTracker()
157 : first_run_(false), 157 : first_run_(false),
158 send_ping_immediately_(false), 158 send_ping_immediately_(false),
159 is_google_default_search_(false), 159 is_google_default_search_(false),
160 is_google_homepage_(false), 160 is_google_homepage_(false),
161 is_google_in_startpages_(false), 161 is_google_in_startpages_(false),
162 already_ran_(false), 162 already_ran_(false),
163 omnibox_used_(false), 163 omnibox_used_(false),
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 // This method is called during unit tests while the RLZTracker has not been 556 // This method is called during unit tests while the RLZTracker has not been
557 // initialized, so check for the presence of a delegate and exit if there is 557 // initialized, so check for the presence of a delegate and exit if there is
558 // none registered. 558 // none registered.
559 RLZTracker* tracker = GetInstance(); 559 RLZTracker* tracker = GetInstance();
560 if (tracker->delegate_) 560 if (tracker->delegate_)
561 tracker->RecordFirstSearch(RLZTracker::ChromeAppList()); 561 tracker->RecordFirstSearch(RLZTracker::ChromeAppList());
562 } 562 }
563 #endif 563 #endif
564 564
565 } // namespace rlz 565 } // namespace rlz
OLDNEW
« no previous file with comments | « components/rlz/rlz_tracker.h ('k') | components/service_tab_launcher/browser/android/service_tab_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698