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

Side by Side Diff: chrome/browser/component_updater/sw_reporter_installer_win.cc

Issue 1107963003: [chrome/browser/component_updater] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/component_updater/sw_reporter_installer_win.h" 5 #include "chrome/browser/component_updater/sw_reporter_installer_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 bool CanAutoUpdate() const override { return true; } 300 bool CanAutoUpdate() const override { return true; }
301 301
302 bool OnCustomInstall(const base::DictionaryValue& manifest, 302 bool OnCustomInstall(const base::DictionaryValue& manifest,
303 const base::FilePath& install_dir) override { 303 const base::FilePath& install_dir) override {
304 return true; 304 return true;
305 } 305 }
306 306
307 void ComponentReady(const base::Version& version, 307 void ComponentReady(const base::Version& version,
308 const base::FilePath& install_dir, 308 const base::FilePath& install_dir,
309 scoped_ptr<base::DictionaryValue> manifest) override { 309 scoped_ptr<base::DictionaryValue> manifest) override {
310 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 310 DCHECK_CURRENTLY_ON(BrowserThread::UI);
311 ReportVersionWithUma(version); 311 ReportVersionWithUma(version);
312 312
313 wcsncpy_s(version_dir_, 313 wcsncpy_s(version_dir_,
314 _MAX_PATH, 314 _MAX_PATH,
315 install_dir.value().c_str(), 315 install_dir.value().c_str(),
316 install_dir.value().size()); 316 install_dir.value().size());
317 317
318 // A previous run may have results in the registry, so check and report 318 // A previous run may have results in the registry, so check and report
319 // them if present. 319 // them if present.
320 std::string version_string(version.GetString()); 320 std::string version_string(version.GetString());
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 void RegisterProfilePrefsForSwReporter( 475 void RegisterProfilePrefsForSwReporter(
476 user_prefs::PrefRegistrySyncable* registry) { 476 user_prefs::PrefRegistrySyncable* registry) {
477 registry->RegisterIntegerPref(prefs::kSwReporterPromptReason, -1); 477 registry->RegisterIntegerPref(prefs::kSwReporterPromptReason, -1);
478 478
479 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); 479 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, "");
480 480
481 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); 481 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, "");
482 } 482 }
483 483
484 } // namespace component_updater 484 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698