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

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

Issue 100573002: Move directory creation functions 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 // 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 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 NOTREACHED(); 1508 NOTREACHED();
1509 return false; 1509 return false;
1510 } 1510 }
1511 1511
1512 base::win::ShortcutOperation shortcut_operation = 1512 base::win::ShortcutOperation shortcut_operation =
1513 TranslateShortcutOperation(operation); 1513 TranslateShortcutOperation(operation);
1514 bool ret = true; 1514 bool ret = true;
1515 if (should_install_shortcut) { 1515 if (should_install_shortcut) {
1516 // Make sure the parent directories exist when creating the shortcut. 1516 // Make sure the parent directories exist when creating the shortcut.
1517 if (shortcut_operation == base::win::SHORTCUT_CREATE_ALWAYS && 1517 if (shortcut_operation == base::win::SHORTCUT_CREATE_ALWAYS &&
1518 !file_util::CreateDirectory(chosen_path->DirName())) { 1518 !base::CreateDirectory(chosen_path->DirName())) {
1519 NOTREACHED(); 1519 NOTREACHED();
1520 return false; 1520 return false;
1521 } 1521 }
1522 1522
1523 base::win::ShortcutProperties shortcut_properties( 1523 base::win::ShortcutProperties shortcut_properties(
1524 TranslateShortcutProperties(properties)); 1524 TranslateShortcutProperties(properties));
1525 ret = base::win::CreateOrUpdateShortcutLink( 1525 ret = base::win::CreateOrUpdateShortcutLink(
1526 *chosen_path, shortcut_properties, shortcut_operation); 1526 *chosen_path, shortcut_properties, shortcut_operation);
1527 } 1527 }
1528 1528
(...skipping 625 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/self_cleaning_temp_dir.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698