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

Side by Side Diff: chrome/browser/doodle/doodle_service_factory.cc

Issue 2772313002: [Doodle] Don't refresh more than once per 15 mins (Closed)
Patch Set: override_min_refresh_interval Created 3 years, 9 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 | « no previous file | components/doodle/doodle_service.h » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "chrome/browser/doodle/doodle_service_factory.h" 5 #include "chrome/browser/doodle/doodle_service_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 bool use_gray_background = false; 53 bool use_gray_background = false;
54 #if defined(OS_ANDROID) 54 #if defined(OS_ANDROID)
55 use_gray_background = 55 use_gray_background =
56 !base::FeatureList::IsEnabled(chrome::android::kChromeHomeFeature); 56 !base::FeatureList::IsEnabled(chrome::android::kChromeHomeFeature);
57 #endif 57 #endif
58 auto fetcher = base::MakeUnique<doodle::DoodleFetcherImpl>( 58 auto fetcher = base::MakeUnique<doodle::DoodleFetcherImpl>(
59 profile->GetRequestContext(), 59 profile->GetRequestContext(),
60 GoogleURLTrackerFactory::GetForProfile(profile), 60 GoogleURLTrackerFactory::GetForProfile(profile),
61 base::Bind(&safe_json::SafeJsonParser::Parse), use_gray_background); 61 base::Bind(&safe_json::SafeJsonParser::Parse), use_gray_background);
62 return new doodle::DoodleService(profile->GetPrefs(), std::move(fetcher), 62 return new doodle::DoodleService(
63 base::MakeUnique<base::OneShotTimer>(), 63 profile->GetPrefs(), std::move(fetcher),
64 base::MakeUnique<base::DefaultClock>(), 64 base::MakeUnique<base::OneShotTimer>(),
65 base::MakeUnique<base::DefaultTickClock>()); 65 base::MakeUnique<base::DefaultClock>(),
66 base::MakeUnique<base::DefaultTickClock>(),
67 /*override_min_refresh_interval=*/base::nullopt);
66 } 68 }
OLDNEW
« no previous file with comments | « no previous file | components/doodle/doodle_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698