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

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

Issue 12282019: Disable "using base::FilePath" on Linux since it now compiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <shlwapi.h> 5 #include <shlwapi.h>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/win/registry.h" 9 #include "base/win/registry.h"
10 #include "chrome/installer/util/create_reg_key_work_item.h" 10 #include "chrome/installer/util/create_reg_key_work_item.h"
11 #include "chrome/installer/util/install_util.h" 11 #include "chrome/installer/util/install_util.h"
12 #include "chrome/installer/util/logging_installer.h" 12 #include "chrome/installer/util/logging_installer.h"
13 13
14 using base::win::RegKey; 14 using base::win::RegKey;
15 15
16 namespace { 16 namespace {
17 17
18 // TODO: refactor this because it is only used once. 18 // TODO: refactor this because it is only used once.
19 void UpOneDirectoryOrEmpty(std::wstring* dir) { 19 void UpOneDirectoryOrEmpty(std::wstring* dir) {
20 FilePath path = FilePath::FromWStringHack(*dir); 20 base::FilePath path = base::FilePath::FromWStringHack(*dir);
21 FilePath directory = path.DirName(); 21 base::FilePath directory = path.DirName();
22 // If there is no separator, we will get back kCurrentDirectory. 22 // If there is no separator, we will get back kCurrentDirectory.
23 // In this case, clear dir. 23 // In this case, clear dir.
24 if (directory == path || directory.value() == FilePath::kCurrentDirectory) 24 if (directory == path || directory.value() ==
25 base::FilePath::kCurrentDirectory)
25 dir->clear(); 26 dir->clear();
26 else 27 else
27 *dir = directory.value(); 28 *dir = directory.value();
28 } 29 }
29 30
30 } // namespace 31 } // namespace
31 32
32 CreateRegKeyWorkItem::~CreateRegKeyWorkItem() { 33 CreateRegKeyWorkItem::~CreateRegKeyWorkItem() {
33 } 34 }
34 35
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 do { 116 do {
116 key_list_.push_back(key_path); 117 key_list_.push_back(key_path);
117 // This is pure string operation so it does not matter whether the 118 // This is pure string operation so it does not matter whether the
118 // path is file path or registry path. 119 // path is file path or registry path.
119 UpOneDirectoryOrEmpty(&key_path); 120 UpOneDirectoryOrEmpty(&key_path);
120 } while (!key_path.empty()); 121 } while (!key_path.empty());
121 122
122 return true; 123 return true;
123 } 124 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_private_api.cc ('k') | chrome/installer/util/google_update_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698