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

Side by Side Diff: chrome/browser/ui/network_profile_bubble.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
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/ui/network_profile_bubble.h" 5 #include "chrome/browser/ui/network_profile_bubble.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <wtsapi32.h> 9 #include <wtsapi32.h>
10 // Make sure we link the wtsapi lib file in. 10 // Make sure we link the wtsapi lib file in.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Try to create some non-empty temp file in the profile dir and use 128 // Try to create some non-empty temp file in the profile dir and use
129 // it to check if there is a reparse-point free path to it. 129 // it to check if there is a reparse-point free path to it.
130 if (file_util::CreateTemporaryFileInDir(profile_folder, &temp_file) && 130 if (file_util::CreateTemporaryFileInDir(profile_folder, &temp_file) &&
131 file_util::WriteFile(temp_file, ".", 1)) { 131 file_util::WriteFile(temp_file, ".", 1)) {
132 base::FilePath normalized_temp_file; 132 base::FilePath normalized_temp_file;
133 if (!file_util::NormalizeFilePath(temp_file, &normalized_temp_file)) 133 if (!file_util::NormalizeFilePath(temp_file, &normalized_temp_file))
134 profile_on_network = true; 134 profile_on_network = true;
135 } else { 135 } else {
136 RecordUmaEvent(METRIC_CHECK_IO_FAILED); 136 RecordUmaEvent(METRIC_CHECK_IO_FAILED);
137 } 137 }
138 file_util::Delete(temp_file, false); 138 base::Delete(temp_file, false);
139 } 139 }
140 if (profile_on_network) { 140 if (profile_on_network) {
141 RecordUmaEvent(METRIC_PROFILE_ON_NETWORK); 141 RecordUmaEvent(METRIC_PROFILE_ON_NETWORK);
142 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 142 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
143 base::Bind(&NotifyNetworkProfileDetected)); 143 base::Bind(&NotifyNetworkProfileDetected));
144 } else { 144 } else {
145 RecordUmaEvent(METRIC_PROFILE_NOT_ON_NETWORK); 145 RecordUmaEvent(METRIC_PROFILE_NOT_ON_NETWORK);
146 } 146 }
147 } else { 147 } else {
148 RecordUmaEvent(METRIC_REMOTE_SESSION); 148 RecordUmaEvent(METRIC_REMOTE_SESSION);
(...skipping 30 matching lines...) Expand all
179 // static 179 // static
180 void NetworkProfileBubble::NotifyNetworkProfileDetected() { 180 void NetworkProfileBubble::NotifyNetworkProfileDetected() {
181 Browser* browser = chrome::FindLastActiveWithHostDesktopType( 181 Browser* browser = chrome::FindLastActiveWithHostDesktopType(
182 chrome::GetActiveDesktop()); 182 chrome::GetActiveDesktop());
183 183
184 if (browser) 184 if (browser)
185 ShowNotification(browser); 185 ShowNotification(browser);
186 else 186 else
187 BrowserList::AddObserver(new BrowserListObserver()); 187 BrowserList::AddObserver(new BrowserListObserver());
188 } 188 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_mac.mm ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698