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

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

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 4 years, 12 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
« no previous file with comments | « components/rlz/rlz_tracker.h ('k') | components/rlz/rlz_tracker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include <algorithm> 11 #include <algorithm>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "base/trace_event/trace_event.h" 17 #include "base/trace_event/trace_event.h"
18 #include "build/build_config.h"
18 #include "components/rlz/rlz_tracker_delegate.h" 19 #include "components/rlz/rlz_tracker_delegate.h"
19 #include "net/http/http_util.h" 20 #include "net/http/http_util.h"
20 21
21 namespace rlz { 22 namespace rlz {
22 namespace { 23 namespace {
23 24
24 // Maximum and minimum delay for financial ping we would allow to be set through 25 // Maximum and minimum delay for financial ping we would allow to be set through
25 // master preferences. Somewhat arbitrary, may need to be adjusted in future. 26 // master preferences. Somewhat arbitrary, may need to be adjusted in future.
26 const base::TimeDelta kMaxInitDelay = base::TimeDelta::FromSeconds(200); 27 const base::TimeDelta kMaxInitDelay = base::TimeDelta::FromSeconds(200);
27 const base::TimeDelta kMinInitDelay = base::TimeDelta::FromSeconds(20); 28 const base::TimeDelta kMinInitDelay = base::TimeDelta::FromSeconds(20);
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 // This method is called during unit tests while the RLZTracker has not been 557 // 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 558 // initialized, so check for the presence of a delegate and exit if there is
558 // none registered. 559 // none registered.
559 RLZTracker* tracker = GetInstance(); 560 RLZTracker* tracker = GetInstance();
560 if (tracker->delegate_) 561 if (tracker->delegate_)
561 tracker->RecordFirstSearch(RLZTracker::ChromeAppList()); 562 tracker->RecordFirstSearch(RLZTracker::ChromeAppList());
562 } 563 }
563 #endif 564 #endif
564 565
565 } // namespace rlz 566 } // namespace rlz
OLDNEW
« no previous file with comments | « components/rlz/rlz_tracker.h ('k') | components/rlz/rlz_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698