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

Side by Side Diff: cloud_print/service/win/service_listener.cc

Issue 16950028: Move file_util::Delete 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
« no previous file with comments | « cloud_print/service/win/installer.cc ('k') | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cloud_print/service/win/service_listener.h" 5 #include "cloud_print/service/win/service_listener.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 25 matching lines...) Expand all
36 environment.SetString(SetupListener::kUserNameJsonValueName, 36 environment.SetString(SetupListener::kUserNameJsonValueName,
37 GetCurrentUserName()); 37 GetCurrentUserName());
38 environment.SetString(SetupListener::kChromePathJsonValueName, 38 environment.SetString(SetupListener::kChromePathJsonValueName,
39 chrome_launcher_support::GetAnyChromePath().value()); 39 chrome_launcher_support::GetAnyChromePath().value());
40 if (file_util::CreateDirectory(user_data_dir)) { 40 if (file_util::CreateDirectory(user_data_dir)) {
41 base::FilePath temp_file; 41 base::FilePath temp_file;
42 if (file_util::CreateTemporaryFileInDir(user_data_dir, &temp_file)) { 42 if (file_util::CreateTemporaryFileInDir(user_data_dir, &temp_file)) {
43 DCHECK(file_util::PathExists(temp_file)); 43 DCHECK(file_util::PathExists(temp_file));
44 environment.SetString(SetupListener::kUserDataDirJsonValueName, 44 environment.SetString(SetupListener::kUserDataDirJsonValueName,
45 user_data_dir.value()); 45 user_data_dir.value());
46 file_util::Delete(temp_file, false); 46 base::Delete(temp_file, false);
47 } 47 }
48 } 48 }
49 49
50 std::string result; 50 std::string result;
51 base::JSONWriter::Write(&environment, &result); 51 base::JSONWriter::Write(&environment, &result);
52 return result; 52 return result;
53 } 53 }
54 54
55 } // namespace 55 } // namespace
56 56
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 IPC::Channel::MODE_CLIENT, this)); 95 IPC::Channel::MODE_CLIENT, this));
96 channel_->Connect(); 96 channel_->Connect();
97 } else { 97 } else {
98 ipc_thread_->message_loop()->PostDelayedTask( 98 ipc_thread_->message_loop()->PostDelayedTask(
99 FROM_HERE, 99 FROM_HERE,
100 base::Bind(&ServiceListener::Connect, base::Unretained(this)), 100 base::Bind(&ServiceListener::Connect, base::Unretained(this)),
101 base::TimeDelta::FromMilliseconds(500)); 101 base::TimeDelta::FromMilliseconds(500));
102 } 102 }
103 } 103 }
104 104
OLDNEW
« no previous file with comments | « cloud_print/service/win/installer.cc ('k') | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698