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

Side by Side Diff: chrome/browser/chrome_to_mobile_service.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 | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chromeos/app_mode/kiosk_app_data.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 (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 #include "chrome/browser/chrome_to_mobile_service.h" 5 #include "chrome/browser/chrome_to_mobile_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 base::Bind(callback, base::Passed(&data)))) { 198 base::Bind(callback, base::Passed(&data)))) {
199 LogMetric(SNAPSHOT_ERROR); 199 LogMetric(SNAPSHOT_ERROR);
200 NOTREACHED(); 200 NOTREACHED();
201 } 201 }
202 } 202 }
203 203
204 // Delete the snapshot file; DCHECK, but really ignore the result of the delete. 204 // Delete the snapshot file; DCHECK, but really ignore the result of the delete.
205 // Call this as a BlockingPoolSequencedTask [after posting SubmitSnapshotFile]. 205 // Call this as a BlockingPoolSequencedTask [after posting SubmitSnapshotFile].
206 void DeleteSnapshotFile(const base::FilePath& snapshot) { 206 void DeleteSnapshotFile(const base::FilePath& snapshot) {
207 DCHECK(!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 207 DCHECK(!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
208 bool success = file_util::Delete(snapshot, false); 208 bool success = base::Delete(snapshot, false);
209 DCHECK(success); 209 DCHECK(success);
210 } 210 }
211 211
212 // Returns true if the url can be sent via Chrome To Mobile. 212 // Returns true if the url can be sent via Chrome To Mobile.
213 bool CanSendURL(const GURL& url) { 213 bool CanSendURL(const GURL& url) {
214 return url.SchemeIs(chrome::kHttpScheme) || 214 return url.SchemeIs(chrome::kHttpScheme) ||
215 url.SchemeIs(chrome::kHttpsScheme) || 215 url.SchemeIs(chrome::kHttpsScheme) ||
216 url.SchemeIs(chrome::kFtpScheme); 216 url.SchemeIs(chrome::kFtpScheme);
217 } 217 }
218 218
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 755
756 // Report failure below and ignore the second response. 756 // Report failure below and ignore the second response.
757 request_observer_map_.erase(other); 757 request_observer_map_.erase(other);
758 break; 758 break;
759 } 759 }
760 } 760 }
761 761
762 if (observer.get()) 762 if (observer.get())
763 observer->OnSendComplete(success); 763 observer->OnSendComplete(success);
764 } 764 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chromeos/app_mode/kiosk_app_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698