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

Side by Side Diff: chrome/installer/setup/install.cc

Issue 102843002: Move RemoveChars, ReplaceChars, TrimString, and TruncateUTF8ToByteSize to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
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/installer/setup/install.h" 5 #include "chrome/installer/setup/install.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <time.h> 9 #include <time.h>
10 10
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return installer::INSTALL_SHORTCUT_CREATE_ALL; 282 return installer::INSTALL_SHORTCUT_CREATE_ALL;
283 283
284 return installer::INSTALL_SHORTCUT_REPLACE_EXISTING; 284 return installer::INSTALL_SHORTCUT_REPLACE_EXISTING;
285 } 285 }
286 286
287 } // end namespace 287 } // end namespace
288 288
289 namespace installer { 289 namespace installer {
290 290
291 void EscapeXmlAttributeValueInSingleQuotes(string16* att_value) { 291 void EscapeXmlAttributeValueInSingleQuotes(string16* att_value) {
292 ReplaceChars(*att_value, L"&", L"&amp;", att_value); 292 base::ReplaceChars(*att_value, L"&", L"&amp;", att_value);
293 ReplaceChars(*att_value, L"'", L"&apos;", att_value); 293 base::ReplaceChars(*att_value, L"'", L"&apos;", att_value);
294 ReplaceChars(*att_value, L"<", L"&lt;", att_value); 294 base::ReplaceChars(*att_value, L"<", L"&lt;", att_value);
295 } 295 }
296 296
297 bool CreateVisualElementsManifest(const base::FilePath& src_path, 297 bool CreateVisualElementsManifest(const base::FilePath& src_path,
298 const Version& version) { 298 const Version& version) {
299 // Construct the relative path to the versioned VisualElements directory. 299 // Construct the relative path to the versioned VisualElements directory.
300 string16 elements_dir(ASCIIToUTF16(version.GetString())); 300 string16 elements_dir(ASCIIToUTF16(version.GetString()));
301 elements_dir.push_back(base::FilePath::kSeparators[0]); 301 elements_dir.push_back(base::FilePath::kSeparators[0]);
302 elements_dir.append(installer::kVisualElements); 302 elements_dir.append(installer::kVisualElements);
303 303
304 // Some distributions of Chromium may not include visual elements. Only 304 // Some distributions of Chromium may not include visual elements. Only
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 if (app_host_path.empty()) 694 if (app_host_path.empty())
695 return false; 695 return false;
696 696
697 CommandLine cmd(app_host_path); 697 CommandLine cmd(app_host_path);
698 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); 698 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code);
699 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); 699 VLOG(1) << "App install command: " << cmd.GetCommandLineString();
700 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); 700 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL);
701 } 701 }
702 702
703 } // namespace installer 703 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698