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

Side by Side Diff: chrome/installer/util/google_chrome_distribution.cc

Issue 441008: Many changes to DictionaryValues:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file defines specific implementation of BrowserDistribution class for 5 // This file defines specific implementation of BrowserDistribution class for
6 // Google Chrome. 6 // Google Chrome.
7 7
8 #include "chrome/installer/util/google_chrome_distribution.h" 8 #include "chrome/installer/util/google_chrome_distribution.h"
9 9
10 #include <atlbase.h> 10 #include <atlbase.h>
11 #include <windows.h> 11 #include <windows.h>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return base::LaunchApp(cmd_line, false, false, NULL); 105 return base::LaunchApp(cmd_line, false, false, NULL);
106 } 106 }
107 107
108 } // namespace 108 } // namespace
109 109
110 bool GoogleChromeDistribution::BuildUninstallMetricsString( 110 bool GoogleChromeDistribution::BuildUninstallMetricsString(
111 DictionaryValue* uninstall_metrics_dict, std::wstring* metrics) { 111 DictionaryValue* uninstall_metrics_dict, std::wstring* metrics) {
112 DCHECK(NULL != metrics); 112 DCHECK(NULL != metrics);
113 bool has_values = false; 113 bool has_values = false;
114 114
115 DictionaryValue::key_iterator iter(uninstall_metrics_dict->begin_keys()); 115 for (DictionaryValue::key_iterator iter(uninstall_metrics_dict->begin_keys());
116 for (; iter != uninstall_metrics_dict->end_keys(); ++iter) { 116 iter != uninstall_metrics_dict->end_keys(); ++iter) {
117 has_values = true; 117 has_values = true;
118 metrics->append(L"&"); 118 metrics->append(L"&");
119 metrics->append(*iter); 119 metrics->append(*iter);
120 metrics->append(L"="); 120 metrics->append(L"=");
121 121
122 std::wstring value; 122 std::wstring value;
123 uninstall_metrics_dict->GetString(*iter, &value); 123 uninstall_metrics_dict->GetStringWithoutPathExpansion(*iter, &value);
124 metrics->append(value); 124 metrics->append(value);
125 } 125 }
126 126
127 return has_values; 127 return has_values;
128 } 128 }
129 129
130 bool GoogleChromeDistribution::ExtractUninstallMetricsFromFile( 130 bool GoogleChromeDistribution::ExtractUninstallMetricsFromFile(
131 const std::wstring& file_path, std::wstring* uninstall_metrics_string) { 131 const std::wstring& file_path, std::wstring* uninstall_metrics_string) {
132 132
133 JSONFileValueSerializer json_serializer(FilePath::FromWStringHack(file_path)); 133 JSONFileValueSerializer json_serializer(FilePath::FromWStringHack(file_path));
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 }; 493 };
494 GoogleUpdateSettings::SetClient(outcome); 494 GoogleUpdateSettings::SetClient(outcome);
495 if (outcome != kToastExpUninstallGroup) 495 if (outcome != kToastExpUninstallGroup)
496 return; 496 return;
497 // The user wants to uninstall. This is a best effort operation. Note that 497 // The user wants to uninstall. This is a best effort operation. Note that
498 // we waited for chrome to exit so the uninstall would not detect chrome 498 // we waited for chrome to exit so the uninstall would not detect chrome
499 // running. 499 // running.
500 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false), 500 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false),
501 false, false, NULL); 501 false, false, NULL);
502 } 502 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698