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

Side by Side Diff: chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc

Issue 333193002: Adding a SW reporter component updater (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to ToT. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/profile_resetter/automatic_profile_resetter_delegate.h" 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 void AutomaticProfileResetterDelegateImpl::RunProfileSettingsReset( 350 void AutomaticProfileResetterDelegateImpl::RunProfileSettingsReset(
351 bool send_feedback, 351 bool send_feedback,
352 const base::Closure& completion) { 352 const base::Closure& completion) {
353 DCHECK(brandcoded_defaults_); 353 DCHECK(brandcoded_defaults_);
354 scoped_ptr<ResettableSettingsSnapshot> old_settings_snapshot; 354 scoped_ptr<ResettableSettingsSnapshot> old_settings_snapshot;
355 if (send_feedback) { 355 if (send_feedback) {
356 old_settings_snapshot.reset(new ResettableSettingsSnapshot(profile_)); 356 old_settings_snapshot.reset(new ResettableSettingsSnapshot(profile_));
357 old_settings_snapshot->RequestShortcuts(base::Closure()); 357 old_settings_snapshot->RequestShortcuts(base::Closure());
358 } 358 }
359 profile_resetter_->Reset( 359 profile_resetter_->Reset(resettable_aspects_,
360 resettable_aspects_, 360 brandcoded_defaults_.Pass(),
361 brandcoded_defaults_.Pass(), 361 send_feedback,
362 base::Bind(&AutomaticProfileResetterDelegateImpl:: 362 base::Bind(&AutomaticProfileResetterDelegateImpl::
363 OnProfileSettingsResetCompleted, 363 OnProfileSettingsResetCompleted,
364 AsWeakPtr(), 364 AsWeakPtr(),
365 completion, 365 completion,
366 base::Passed(&old_settings_snapshot))); 366 base::Passed(&old_settings_snapshot)));
367 } 367 }
368 368
369 void AutomaticProfileResetterDelegateImpl:: 369 void AutomaticProfileResetterDelegateImpl::
370 OnBrandcodedDefaultsFetched() { 370 OnBrandcodedDefaultsFetched() {
371 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 371 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
372 DCHECK(brandcoded_config_fetcher_); 372 DCHECK(brandcoded_config_fetcher_);
373 DCHECK(!brandcoded_config_fetcher_->IsActive()); 373 DCHECK(!brandcoded_config_fetcher_->IsActive());
374 brandcoded_defaults_ = brandcoded_config_fetcher_->GetSettings(); 374 brandcoded_defaults_ = brandcoded_config_fetcher_->GetSettings();
375 if (!brandcoded_defaults_) 375 if (!brandcoded_defaults_)
376 brandcoded_defaults_.reset(new BrandcodedDefaultSettings); 376 brandcoded_defaults_.reset(new BrandcodedDefaultSettings);
(...skipping 11 matching lines...) Expand all
388 if (difference) { 388 if (difference) {
389 old_settings_snapshot->Subtract(new_settings_snapshot); 389 old_settings_snapshot->Subtract(new_settings_snapshot);
390 std::string report = 390 std::string report =
391 SerializeSettingsReport(*old_settings_snapshot, difference); 391 SerializeSettingsReport(*old_settings_snapshot, difference);
392 SendFeedback(report); 392 SendFeedback(report);
393 } 393 }
394 } 394 }
395 content::BrowserThread::PostTask( 395 content::BrowserThread::PostTask(
396 content::BrowserThread::UI, FROM_HERE, user_callback); 396 content::BrowserThread::UI, FROM_HERE, user_callback);
397 } 397 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/profile_resetter/profile_resetter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698