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

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

Issue 1358513003: Use correct IntToString variants in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 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.h" 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 &results->had_prompted_already); 654 &results->had_prompted_already);
655 interpreter.GetOutputString(kMementoValueInPrefsKey, 655 interpreter.GetOutputString(kMementoValueInPrefsKey,
656 &results->memento_value_in_prefs); 656 &results->memento_value_in_prefs);
657 interpreter.GetOutputString(kMementoValueInLocalStateKey, 657 interpreter.GetOutputString(kMementoValueInLocalStateKey,
658 &results->memento_value_in_local_state); 658 &results->memento_value_in_local_state);
659 interpreter.GetOutputString(kMementoValueInFileKey, 659 interpreter.GetOutputString(kMementoValueInFileKey,
660 &results->memento_value_in_file); 660 &results->memento_value_in_file);
661 for (size_t i = 0; i < kCombinedStatusMaskNumberOfBits; ++i) { 661 for (size_t i = 0; i < kCombinedStatusMaskNumberOfBits; ++i) {
662 bool flag = false; 662 bool flag = false;
663 std::string mask_i_th_bit_key = 663 std::string mask_i_th_bit_key =
664 kCombinedStatusMaskKeyPrefix + base::IntToString(i + 1); 664 kCombinedStatusMaskKeyPrefix + base::SizeTToString(i + 1);
665 if (interpreter.GetOutputBoolean(mask_i_th_bit_key, &flag) && flag) 665 if (interpreter.GetOutputBoolean(mask_i_th_bit_key, &flag) && flag)
666 results->combined_status_mask |= (1 << i); 666 results->combined_status_mask |= (1 << i);
667 } 667 }
668 for (size_t i = 0; i < kSatisfiedCriteriaMaskNumberOfBits; ++i) { 668 for (size_t i = 0; i < kSatisfiedCriteriaMaskNumberOfBits; ++i) {
669 bool flag = false; 669 bool flag = false;
670 std::string mask_i_th_bit_key = 670 std::string mask_i_th_bit_key =
671 kSatisfiedCriteriaMaskKeyPrefix + base::IntToString(i + 1); 671 kSatisfiedCriteriaMaskKeyPrefix + base::SizeTToString(i + 1);
672 if (interpreter.GetOutputBoolean(mask_i_th_bit_key, &flag) && flag) 672 if (interpreter.GetOutputBoolean(mask_i_th_bit_key, &flag) && flag)
673 results->satisfied_criteria_mask |= (1 << i); 673 results->satisfied_criteria_mask |= (1 << i);
674 } 674 }
675 return results.Pass(); 675 return results.Pass();
676 } 676 }
677 677
678 void AutomaticProfileResetter::ReportStatistics(uint32 satisfied_criteria_mask, 678 void AutomaticProfileResetter::ReportStatistics(uint32 satisfied_criteria_mask,
679 uint32 combined_status_mask) { 679 uint32 combined_status_mask) {
680 UMA_HISTOGRAM_ENUMERATION("AutomaticProfileReset.SatisfiedCriteriaMask", 680 UMA_HISTOGRAM_ENUMERATION("AutomaticProfileReset.SatisfiedCriteriaMask",
681 satisfied_criteria_mask, 681 satisfied_criteria_mask,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 755
756 void AutomaticProfileResetter::FinishResetPromptFlow() { 756 void AutomaticProfileResetter::FinishResetPromptFlow() {
757 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 757 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
758 DCHECK(state_ == STATE_HAS_TRIGGERED_PROMPT || 758 DCHECK(state_ == STATE_HAS_TRIGGERED_PROMPT ||
759 state_ == STATE_HAS_SHOWN_BUBBLE || 759 state_ == STATE_HAS_SHOWN_BUBBLE ||
760 state_ == STATE_PERFORMING_RESET); 760 state_ == STATE_PERFORMING_RESET);
761 DCHECK(!evaluation_results_); 761 DCHECK(!evaluation_results_);
762 762
763 state_ = STATE_DONE; 763 state_ = STATE_DONE;
764 } 764 }
OLDNEW
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor.cc ('k') | chrome/browser/profiles/profile_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698