Skip to content

Commit dd4bccf

Browse files
committed
Fix nwjs/nw.js#7023: Phoning home to accounts.google.com
1 parent 155cbea commit dd4bccf

File tree

12 files changed

+24
-15
lines changed

12 files changed

+24
-15
lines changed

chrome/browser/chrome_browser_main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
16551655
//
16561656
// This can't be created in the BrowserProcessImpl constructor because it
16571657
// needs to read prefs that get set after that runs.
1658-
browser_process_->intranet_redirect_detector();
1658+
//browser_process_->intranet_redirect_detector();
16591659

16601660
#if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
16611661
if (parsed_command_line().HasSwitch(switches::kDebugPrint)) {

chrome/browser/safe_browsing/client_side_model_loader.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ ModelLoader::~ModelLoader() {
117117
}
118118

119119
void ModelLoader::StartFetch() {
120+
#if 0
120121
// Start fetching the model either from the cache or possibly from the
121122
// network if the model isn't in the cache.
122123

@@ -163,6 +164,7 @@ void ModelLoader::StartFetch() {
163164
url_loader_factory_.get(),
164165
base::BindOnce(&ModelLoader::OnURLLoaderComplete,
165166
base::Unretained(this)));
167+
#endif
166168
}
167169

168170
void ModelLoader::OnURLLoaderComplete(

chrome/browser/search/one_google_bar/one_google_bar_loader_impl.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,14 @@ OneGoogleBarLoaderImpl::OneGoogleBarLoaderImpl(
262262
: url_loader_factory_(url_loader_factory),
263263
google_url_tracker_(google_url_tracker),
264264
application_locale_(application_locale),
265-
account_consistency_mirror_required_(account_consistency_mirror_required),
265+
// account_consistency_mirror_required_(account_consistency_mirror_required),
266266
weak_ptr_factory_(this) {}
267267

268268
OneGoogleBarLoaderImpl::~OneGoogleBarLoaderImpl() = default;
269269

270270
void OneGoogleBarLoaderImpl::Load(OneGoogleCallback callback) {
271271
callbacks_.push_back(std::move(callback));
272+
#if 0
272273

273274
// Note: If there is an ongoing request, abandon it. It's possible that
274275
// something has changed in the meantime (e.g. signin state) that would make
@@ -278,6 +279,7 @@ void OneGoogleBarLoaderImpl::Load(OneGoogleCallback callback) {
278279
base::BindOnce(&OneGoogleBarLoaderImpl::LoadDone,
279280
base::Unretained(this)));
280281
pending_request_->Start();
282+
#endif
281283
}
282284

283285
GURL OneGoogleBarLoaderImpl::GetLoadURLForTesting() const {

chrome/browser/search/one_google_bar/one_google_bar_loader_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class OneGoogleBarLoaderImpl : public OneGoogleBarLoader {
5959
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
6060
GoogleURLTracker* google_url_tracker_;
6161
const std::string application_locale_;
62-
const bool account_consistency_mirror_required_;
62+
//const bool account_consistency_mirror_required_;
6363

6464
std::vector<OneGoogleCallback> callbacks_;
6565
std::unique_ptr<AuthenticatedURLLoader> pending_request_;

components/gcm_driver/gcm_channel_status_syncer.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "components/prefs/pref_service.h"
2222
#include "services/network/public/cpp/shared_url_loader_factory.h"
2323

24-
#include "content/nw/src/nw_base.h"
2524

2625
namespace gcm {
2726

@@ -64,7 +63,7 @@ const char kCustomPollIntervalMinutes[] = "gcm-channel-poll-interval";
6463

6564
// static
6665
void GCMChannelStatusSyncer::RegisterPrefs(PrefRegistrySimple* registry) {
67-
registry->RegisterBooleanPref(prefs::kGCMChannelStatus, nw::gcm_enabled());
66+
registry->RegisterBooleanPref(prefs::kGCMChannelStatus, false);
6867
registry->RegisterIntegerPref(
6968
prefs::kGCMChannelPollIntervalSeconds,
7069
GCMChannelStatusRequest::default_poll_interval_seconds());
@@ -74,7 +73,7 @@ void GCMChannelStatusSyncer::RegisterPrefs(PrefRegistrySimple* registry) {
7473
// static
7574
void GCMChannelStatusSyncer::RegisterProfilePrefs(
7675
user_prefs::PrefRegistrySyncable* registry) {
77-
registry->RegisterBooleanPref(prefs::kGCMChannelStatus, nw::gcm_enabled());
76+
registry->RegisterBooleanPref(prefs::kGCMChannelStatus, false);
7877
registry->RegisterIntegerPref(
7978
prefs::kGCMChannelPollIntervalSeconds,
8079
GCMChannelStatusRequest::default_poll_interval_seconds());
@@ -98,7 +97,7 @@ GCMChannelStatusSyncer::GCMChannelStatusSyncer(
9897
user_agent_(user_agent),
9998
url_loader_factory_(std::move(url_loader_factory)),
10099
started_(false),
101-
gcm_enabled_(nw::gcm_enabled()),
100+
gcm_enabled_(false),
102101
poll_interval_seconds_(
103102
GCMChannelStatusRequest::default_poll_interval_seconds()),
104103
custom_poll_interval_use_count_(0),

components/gcm_driver/gcm_driver_desktop.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "components/timers/alarm_timer_chromeos.h"
3333
#endif
3434

35-
#include "content/nw/src/nw_base.h"
3635

3736
namespace gcm {
3837

@@ -1254,7 +1253,7 @@ GCMClient::Result GCMDriverDesktop::EnsureStarted(
12541253

12551254
// Polling for channel status should be invoked when GCM is being requested,
12561255
// no matter whether GCM is enabled or nor.
1257-
if (nw::gcm_enabled())
1256+
if (false)
12581257
gcm_channel_status_syncer_->EnsureStarted();
12591258

12601259
if (!gcm_enabled_)

components/omnibox/browser/search_provider.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ void SearchProvider::ApplyCalculatedNavigationRelevance(
862862
std::unique_ptr<network::SimpleURLLoader> SearchProvider::CreateSuggestLoader(
863863
const TemplateURL* template_url,
864864
const AutocompleteInput& input) {
865-
if (!template_url || template_url->suggestions_url().empty())
865+
if (true || !template_url || template_url->suggestions_url().empty())
866866
return nullptr;
867867

868868
// Setting SuggestUrl the same as SearchUrl is a typical misconfiguration.

components/safe_browsing/db/v4_update_protocol_manager.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ void V4UpdateProtocolManager::IssueUpdateRequest() {
311311
return;
312312
}
313313

314+
#if 0
314315
net::NetworkTrafficAnnotationTag traffic_annotation =
315316
net::DefineNetworkTrafficAnnotation("safe_browsing_v4_update", R"(
316317
semantics {
@@ -353,7 +354,7 @@ void V4UpdateProtocolManager::IssueUpdateRequest() {
353354
base::Unretained(this)));
354355

355356
request_ = std::move(loader);
356-
357+
#endif
357358
// Begin the update request timeout.
358359
timeout_timer_.Start(FROM_HERE,
359360
TimeDelta::FromSeconds(kV4TimerUpdateWaitSecMax), this,

components/search_provider_logos/logo_service_impl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ void LogoServiceImpl::GetLogo(LogoCallbacks callbacks) {
266266
base_url = doodle_url.GetOrigin();
267267
}
268268

269-
if (!logo_url.is_valid() && !doodle_url.is_valid()) {
269+
if (true) { //!logo_url.is_valid() && !doodle_url.is_valid()) {
270270
RunCallbacksWithDisabled(std::move(callbacks));
271271
return;
272272
}

components/update_client/ping_manager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ PingSender::~PingSender() {
6767
void PingSender::SendPing(const Component& component, Callback callback) {
6868
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
6969

70-
if (component.events().empty()) {
70+
if (true) { //component.events().empty()) {
7171
base::ThreadTaskRunnerHandle::Get()->PostTask(
7272
FROM_HERE, base::BindOnce(std::move(callback), kErrorNoEvents, ""));
7373
return;

0 commit comments

Comments
 (0)