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

Side by Side Diff: components/offline_pages/background/network_quality_provider_stub.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: more rebase Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/offline_pages/background/network_quality_provider_stub.h"
6
7 namespace offline_pages {
8
9 const char kOfflineNQPKey[] = "OfflineNQP";
10
11 NetworkQualityProviderStub::NetworkQualityProviderStub()
12 : connection_type_(
13 net::EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_3G) {}
14
15 NetworkQualityProviderStub::~NetworkQualityProviderStub() {}
16
17 // static
18 NetworkQualityProviderStub* NetworkQualityProviderStub::GetUserData(
19 base::SupportsUserData* supports_user_data) {
20 return static_cast<NetworkQualityProviderStub*>(
21 supports_user_data->GetUserData(&kOfflineNQPKey));
22 }
23
24 // static
25 void NetworkQualityProviderStub::SetUserData(
26 base::SupportsUserData* supports_user_data,
27 NetworkQualityProviderStub* stub) {
28 DCHECK(supports_user_data);
29 DCHECK(stub);
30 supports_user_data->SetUserData(&kOfflineNQPKey, stub);
31 }
32
33 void NetworkQualityProviderStub::AddEffectiveConnectionTypeObserver(
34 net::NetworkQualityEstimator::EffectiveConnectionTypeObserver* observer) {}
35
36 void NetworkQualityProviderStub::RemoveEffectiveConnectionTypeObserver(
37 net::NetworkQualityEstimator::EffectiveConnectionTypeObserver* observer) {}
38
39 net::EffectiveConnectionType
40 NetworkQualityProviderStub::GetEffectiveConnectionType() const {
41 return connection_type_;
42 }
43 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698