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

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

Issue 39048: Move files instead of copying them. (Closed)
Patch Set: More code review comments. Created 11 years, 9 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
« no previous file with comments | « chrome/installer/util/work_item_list.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/util/logging_installer.h" 5 #include "chrome/installer/util/logging_installer.h"
6 #include "chrome/installer/util/work_item_list.h" 6 #include "chrome/installer/util/work_item_list.h"
7 7
8 WorkItemList::~WorkItemList() { 8 WorkItemList::~WorkItemList() {
9 for (WorkItemIterator itr = list_.begin(); itr != list_.end(); ++itr) { 9 for (WorkItemIterator itr = list_.begin(); itr != list_.end(); ++itr) {
10 delete (*itr); 10 delete (*itr);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return AddWorkItem(item); 97 return AddWorkItem(item);
98 } 98 }
99 99
100 bool WorkItemList::AddDeleteTreeWorkItem(std::wstring root_path, 100 bool WorkItemList::AddDeleteTreeWorkItem(std::wstring root_path,
101 std::wstring key_path) { 101 std::wstring key_path) {
102 WorkItem* item = reinterpret_cast<WorkItem*>( 102 WorkItem* item = reinterpret_cast<WorkItem*>(
103 WorkItem::CreateDeleteTreeWorkItem(root_path, key_path)); 103 WorkItem::CreateDeleteTreeWorkItem(root_path, key_path));
104 return AddWorkItem(item); 104 return AddWorkItem(item);
105 } 105 }
106 106
107 bool WorkItemList::AddMoveTreeWorkItem(std::wstring source_path,
108 std::wstring dest_path,
109 std::wstring temp_dir) {
110 WorkItem* item = reinterpret_cast<WorkItem*>(
111 WorkItem::CreateMoveTreeWorkItem(source_path, dest_path, temp_dir));
112 return AddWorkItem(item);
113 }
114
107 bool WorkItemList::AddSetRegValueWorkItem(HKEY predefined_root, 115 bool WorkItemList::AddSetRegValueWorkItem(HKEY predefined_root,
108 std::wstring key_path, 116 std::wstring key_path,
109 std::wstring value_name, 117 std::wstring value_name,
110 std::wstring value_data, 118 std::wstring value_data,
111 bool overwrite) { 119 bool overwrite) {
112 WorkItem* item = reinterpret_cast<WorkItem*>( 120 WorkItem* item = reinterpret_cast<WorkItem*>(
113 WorkItem::CreateSetRegValueWorkItem(predefined_root, key_path, value_name, 121 WorkItem::CreateSetRegValueWorkItem(predefined_root, key_path, value_name,
114 value_data, overwrite)); 122 value_data, overwrite));
115 return AddWorkItem(item); 123 return AddWorkItem(item);
116 } 124 }
117 125
118 bool WorkItemList::AddSetRegValueWorkItem(HKEY predefined_root, 126 bool WorkItemList::AddSetRegValueWorkItem(HKEY predefined_root,
119 std::wstring key_path, 127 std::wstring key_path,
120 std::wstring value_name, 128 std::wstring value_name,
121 DWORD value_data, 129 DWORD value_data,
122 bool overwrite) { 130 bool overwrite) {
123 WorkItem* item = reinterpret_cast<WorkItem*>( 131 WorkItem* item = reinterpret_cast<WorkItem*>(
124 WorkItem::CreateSetRegValueWorkItem(predefined_root, key_path, value_name, 132 WorkItem::CreateSetRegValueWorkItem(predefined_root, key_path, value_name,
125 value_data, overwrite)); 133 value_data, overwrite));
126 return AddWorkItem(item); 134 return AddWorkItem(item);
127 } 135 }
128 136
OLDNEW
« no previous file with comments | « chrome/installer/util/work_item_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698