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

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

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | 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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 DCHECK_GE(base::win::GetVersion(), base::win::VERSION_WIN8); 1170 DCHECK_GE(base::win::GetVersion(), base::win::VERSION_WIN8);
1171 1171
1172 base::FilePath folder; 1172 base::FilePath folder;
1173 if (!PathService::Get(base::DIR_APP_SHORTCUTS, &folder)) { 1173 if (!PathService::Get(base::DIR_APP_SHORTCUTS, &folder)) {
1174 LOG(ERROR) << "Could not get application shortcuts location."; 1174 LOG(ERROR) << "Could not get application shortcuts location.";
1175 return false; 1175 return false;
1176 } 1176 }
1177 1177
1178 folder = folder.Append( 1178 folder = folder.Append(
1179 ShellUtil::GetBrowserModelId(dist, level == ShellUtil::CURRENT_USER)); 1179 ShellUtil::GetBrowserModelId(dist, level == ShellUtil::CURRENT_USER));
1180 if (!file_util::DirectoryExists(folder)) { 1180 if (!base::DirectoryExists(folder)) {
1181 VLOG(1) << "No start screen shortcuts."; 1181 VLOG(1) << "No start screen shortcuts.";
1182 return false; 1182 return false;
1183 } 1183 }
1184 1184
1185 *path = folder; 1185 *path = folder;
1186 return true; 1186 return true;
1187 } 1187 }
1188 1188
1189 typedef base::Callback<bool(const base::FilePath&)> FileOperationCallback; 1189 typedef base::Callback<bool(const base::FilePath&)> FileOperationCallback;
1190 1190
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 // are any left...). 2081 // are any left...).
2082 if (free_bits >= 8 && next_byte_index < size) { 2082 if (free_bits >= 8 && next_byte_index < size) {
2083 free_bits -= 8; 2083 free_bits -= 8;
2084 bit_stream += bytes[next_byte_index++] << free_bits; 2084 bit_stream += bytes[next_byte_index++] << free_bits;
2085 } 2085 }
2086 } 2086 }
2087 2087
2088 DCHECK_EQ(ret.length(), encoded_length); 2088 DCHECK_EQ(ret.length(), encoded_length);
2089 return ret; 2089 return ret;
2090 } 2090 }
OLDNEW
« no previous file with comments | « chrome/installer/util/self_cleaning_temp_dir_unittest.cc ('k') | chrome/test/chromedriver/chrome/zip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698