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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 86913002: Make base::Base64Encode() return void (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more chromeos-specific fix. Created 7 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/metrics/metrics_log.h" 5 #include "chrome/browser/metrics/metrics_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 device::BluetoothAdapterFactory::GetAdapter( 796 device::BluetoothAdapterFactory::GetAdapter(
797 base::Bind(&MetricsLog::SetBluetoothAdapter, 797 base::Bind(&MetricsLog::SetBluetoothAdapter,
798 base::Unretained(this))); 798 base::Unretained(this)));
799 DCHECK(adapter_.get()); 799 DCHECK(adapter_.get());
800 WriteBluetoothProto(hardware); 800 WriteBluetoothProto(hardware);
801 UpdateMultiProfileUserCount(); 801 UpdateMultiProfileUserCount();
802 #endif 802 #endif
803 803
804 std::string serialied_system_profile; 804 std::string serialied_system_profile;
805 std::string base64_system_profile; 805 std::string base64_system_profile;
806 if (system_profile->SerializeToString(&serialied_system_profile) && 806 if (system_profile->SerializeToString(&serialied_system_profile)) {
807 base::Base64Encode(serialied_system_profile, &base64_system_profile)) { 807 base::Base64Encode(serialied_system_profile, &base64_system_profile);
808 PrefService* local_state = GetPrefService(); 808 PrefService* local_state = GetPrefService();
809 local_state->SetString(prefs::kStabilitySavedSystemProfile, 809 local_state->SetString(prefs::kStabilitySavedSystemProfile,
810 base64_system_profile); 810 base64_system_profile);
811 local_state->SetString(prefs::kStabilitySavedSystemProfileHash, 811 local_state->SetString(prefs::kStabilitySavedSystemProfileHash,
812 ComputeSHA1(serialied_system_profile)); 812 ComputeSHA1(serialied_system_profile));
813 } 813 }
814 } 814 }
815 815
816 bool MetricsLog::LoadSavedEnvironmentFromPrefs() { 816 bool MetricsLog::LoadSavedEnvironmentFromPrefs() {
817 PrefService* local_state = GetPrefService(); 817 PrefService* local_state = GetPrefService();
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 995
996 // We invalidate the user count if it changed while the log was open. 996 // We invalidate the user count if it changed while the log was open.
997 if (system_profile->has_multi_profile_user_count() && 997 if (system_profile->has_multi_profile_user_count() &&
998 user_count != system_profile->multi_profile_user_count()) 998 user_count != system_profile->multi_profile_user_count())
999 user_count = 0; 999 user_count = 0;
1000 1000
1001 system_profile->set_multi_profile_user_count(user_count); 1001 system_profile->set_multi_profile_user_count(user_count);
1002 } 1002 }
1003 } 1003 }
1004 #endif 1004 #endif
OLDNEW
« no previous file with comments | « chrome/browser/media/desktop_streams_registry.cc ('k') | chrome/browser/metrics/metrics_log_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698