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

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

Issue 93263002: Move some more file utils to the 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 // This file defines functions that integrate Chrome in Windows shell. These 5 // This file defines functions that integrate Chrome in Windows shell. These
6 // functions can be used by Chrome as well as Chrome installer. All of the 6 // functions can be used by Chrome as well as Chrome installer. All of the
7 // work is done by the local functions defined in anonymous namespace in 7 // work is done by the local functions defined in anonymous namespace in
8 // this class. 8 // this class.
9 9
10 #include "chrome/installer/util/shell_util.h" 10 #include "chrome/installer/util/shell_util.h"
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 location != ShellUtil::SHORTCUT_LOCATION_APP_SHORTCUTS) { 1321 location != ShellUtil::SHORTCUT_LOCATION_APP_SHORTCUTS) {
1322 NOTREACHED(); 1322 NOTREACHED();
1323 return false; 1323 return false;
1324 } 1324 }
1325 1325
1326 base::FilePath shortcut_folder; 1326 base::FilePath shortcut_folder;
1327 if (!ShellUtil::GetShortcutPath(location, dist, level, &shortcut_folder)) { 1327 if (!ShellUtil::GetShortcutPath(location, dist, level, &shortcut_folder)) {
1328 LOG(WARNING) << "Cannot find path at location " << location; 1328 LOG(WARNING) << "Cannot find path at location " << location;
1329 return false; 1329 return false;
1330 } 1330 }
1331 if (file_util::IsDirectoryEmpty(shortcut_folder) && 1331 if (base::IsDirectoryEmpty(shortcut_folder) &&
1332 !base::DeleteFile(shortcut_folder, true)) { 1332 !base::DeleteFile(shortcut_folder, true)) {
1333 LOG(ERROR) << "Cannot remove folder " << shortcut_folder.value(); 1333 LOG(ERROR) << "Cannot remove folder " << shortcut_folder.value();
1334 return false; 1334 return false;
1335 } 1335 }
1336 return true; 1336 return true;
1337 } 1337 }
1338 1338
1339 } // namespace 1339 } // namespace
1340 1340
1341 const wchar_t* ShellUtil::kRegDefaultIcon = L"\\DefaultIcon"; 1341 const wchar_t* ShellUtil::kRegDefaultIcon = L"\\DefaultIcon";
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 // are any left...). 2154 // are any left...).
2155 if (free_bits >= 8 && next_byte_index < size) { 2155 if (free_bits >= 8 && next_byte_index < size) {
2156 free_bits -= 8; 2156 free_bits -= 8;
2157 bit_stream += bytes[next_byte_index++] << free_bits; 2157 bit_stream += bytes[next_byte_index++] << free_bits;
2158 } 2158 }
2159 } 2159 }
2160 2160
2161 DCHECK_EQ(ret.length(), encoded_length); 2161 DCHECK_EQ(ret.length(), encoded_length);
2162 return ret; 2162 return ret;
2163 } 2163 }
OLDNEW
« no previous file with comments | « chrome/installer/util/move_tree_work_item_unittest.cc ('k') | chrome/tools/crash_service/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698