Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "base/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
| 6 #include "blimp/client/app/linux/blimp_client_context_delegate_linux.h" | 6 #include "blimp/client/app/linux/blimp_client_context_delegate_linux.h" |
| 7 #include "blimp/client/core/settings/settings_prefs.h" | |
| 7 #include "blimp/client/support/session/blimp_default_identity_provider.h" | 8 #include "blimp/client/support/session/blimp_default_identity_provider.h" |
| 9 #include "components/pref_registry/pref_registry_syncable.h" | |
| 10 #include "components/prefs/pref_service.h" | |
| 11 #include "components/prefs/pref_service_factory.h" | |
| 8 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 9 | 13 |
| 10 namespace blimp { | 14 namespace blimp { |
| 11 namespace client { | 15 namespace client { |
| 12 | 16 |
| 13 BlimpClientContextDelegateLinux::BlimpClientContextDelegateLinux() = default; | 17 BlimpClientContextDelegateLinux::BlimpClientContextDelegateLinux() |
| 18 : pref_registry_(new ::user_prefs::PrefRegistrySyncable()) { | |
| 19 // Set up PrefRegistry. | |
| 20 pref_registry_->RegisterBooleanPref(prefs::kBlimpEnabled, false); | |
|
David Trainor- moved to gerrit
2016/10/26 01:14:54
Follow up on the comment in the header. Yeah just
Menglin
2016/10/26 01:46:21
Done.
| |
| 21 pref_registry_->RegisterBooleanPref(prefs::kRecordWholeDocument, false); | |
| 22 | |
| 23 // Set up PrefService. | |
| 24 PrefServiceFactory pref_service_factory; | |
| 25 pref_service_ = pref_service_factory.Create(pref_registry_.get()); | |
| 26 } | |
| 14 | 27 |
| 15 BlimpClientContextDelegateLinux::~BlimpClientContextDelegateLinux() = default; | 28 BlimpClientContextDelegateLinux::~BlimpClientContextDelegateLinux() = default; |
| 16 | 29 |
| 17 void BlimpClientContextDelegateLinux::AttachBlimpContentsHelpers( | 30 void BlimpClientContextDelegateLinux::AttachBlimpContentsHelpers( |
| 18 BlimpContents* blimp_contents) {} | 31 BlimpContents* blimp_contents) {} |
| 19 | 32 |
| 20 void BlimpClientContextDelegateLinux::OnAssignmentConnectionAttempted( | 33 void BlimpClientContextDelegateLinux::OnAssignmentConnectionAttempted( |
| 21 AssignmentRequestResult result, | 34 AssignmentRequestResult result, |
| 22 const Assignment& assignment) { | 35 const Assignment& assignment) { |
| 23 // TODO(xingliu): Update this to use the new error strings and logging helper | 36 // TODO(xingliu): Update this to use the new error strings and logging helper |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 void BlimpClientContextDelegateLinux::OnEngineDisconnected(int result) { | 94 void BlimpClientContextDelegateLinux::OnEngineDisconnected(int result) { |
| 82 LOG(WARNING) << "Disconnected from the engine, reason: " << result; | 95 LOG(WARNING) << "Disconnected from the engine, reason: " << result; |
| 83 } | 96 } |
| 84 | 97 |
| 85 void BlimpClientContextDelegateLinux::OnNetworkDisconnected(int result) { | 98 void BlimpClientContextDelegateLinux::OnNetworkDisconnected(int result) { |
| 86 LOG(WARNING) << "Disconnected, reason: " << net::ErrorToShortString(result); | 99 LOG(WARNING) << "Disconnected, reason: " << net::ErrorToShortString(result); |
| 87 } | 100 } |
| 88 | 101 |
| 89 } // namespace client | 102 } // namespace client |
| 90 } // namespace blimp | 103 } // namespace blimp |
| OLD | NEW |