Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / net / evicted_domain_cookie_counter.cc
index 2d9590a..fa30864 100644 (file)
@@ -10,7 +10,7 @@
 #include "base/metrics/histogram.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
-#include "chrome/browser/google/google_util.h"
+#include "components/google/core/browser/google_util.h"
 #include "net/cookies/canonical_cookie.h"
 
 namespace chrome_browser_net {
@@ -28,10 +28,9 @@ class DelegateImpl : public EvictedDomainCookieCounter::Delegate {
   DelegateImpl();
 
   // EvictedDomainCookieCounter::Delegate implementation.
-  virtual void Report(
-      const EvictedDomainCookieCounter::EvictedCookie& evicted_cookie,
-      const Time& reinstatement_time) OVERRIDE;
-  virtual Time CurrentTime() const OVERRIDE;
+  void Report(const EvictedDomainCookieCounter::EvictedCookie& evicted_cookie,
+              const Time& reinstatement_time) override;
+  Time CurrentTime() const override;
 };
 
 DelegateImpl::DelegateImpl() {}
@@ -41,7 +40,7 @@ void DelegateImpl::Report(
     const Time& reinstatement_time) {
   TimeDelta reinstatement_delay(
       reinstatement_time - evicted_cookie.eviction_time);
-  // Need to duplicate HISTOGRAM_CUSTOM_TIMES(), since it is a macro that
+  // Need to duplicate UMA_HISTOGRAM_CUSTOM_TIMES(), since it is a macro that
   // defines a static variable.
   if (evicted_cookie.is_google) {
     UMA_HISTOGRAM_CUSTOM_TIMES("Cookie.ReinstatedCookiesGoogle",
@@ -111,6 +110,11 @@ void EvictedDomainCookieCounter::OnCookieChanged(
     next_cookie_monster_delegate_->OnCookieChanged(cookie, removed, cause);
 }
 
+void EvictedDomainCookieCounter::OnLoaded() {
+  if (next_cookie_monster_delegate_.get())
+    next_cookie_monster_delegate_->OnLoaded();
+}
+
 // static
 EvictedDomainCookieCounter::EvictedCookieKey
     EvictedDomainCookieCounter::GetKey(const net::CanonicalCookie& cookie) {