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

Side by Side Diff: chrome/browser/ui/ash/screenshot_taker.cc

Issue 93263002: Move some more file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/net/net_log_temp_file.cc ('k') | chrome/browser/web_applications/web_app_mac.mm » ('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/ui/ash/screenshot_taker.h" 5 #include "chrome/browser/ui/ash/screenshot_taker.h"
6 6
7 #include <climits> 7 #include <climits>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 #if defined(OS_CHROMEOS) 359 #if defined(OS_CHROMEOS)
360 is_logged_in = chromeos::LoginState::Get()->IsUserLoggedIn(); 360 is_logged_in = chromeos::LoginState::Get()->IsUserLoggedIn();
361 #endif 361 #endif
362 362
363 if (is_logged_in) { 363 if (is_logged_in) {
364 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext( 364 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(
365 ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext()); 365 ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext());
366 *directory = download_prefs->DownloadPath(); 366 *directory = download_prefs->DownloadPath();
367 } else { 367 } else {
368 if (!file_util::GetTempDir(directory)) { 368 if (!base::GetTempDir(directory)) {
369 LOG(ERROR) << "Failed to find temporary directory."; 369 LOG(ERROR) << "Failed to find temporary directory.";
370 return false; 370 return false;
371 } 371 }
372 } 372 }
373 return true; 373 return true;
374 } 374 }
375 375
376 const int GetScreenshotNotificationTitle( 376 const int GetScreenshotNotificationTitle(
377 ScreenshotTakerObserver::Result screenshot_result) { 377 ScreenshotTakerObserver::Result screenshot_result) {
378 switch (screenshot_result) { 378 switch (screenshot_result) {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } 591 }
592 592
593 void ScreenshotTaker::SetScreenshotBasenameForTest( 593 void ScreenshotTaker::SetScreenshotBasenameForTest(
594 const std::string& basename) { 594 const std::string& basename) {
595 screenshot_basename_for_test_ = basename; 595 screenshot_basename_for_test_ = basename;
596 } 596 }
597 597
598 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) { 598 void ScreenshotTaker::SetScreenshotProfileForTest(Profile* profile) {
599 profile_for_test_ = profile; 599 profile_for_test_ = profile;
600 } 600 }
OLDNEW
« no previous file with comments | « chrome/browser/net/net_log_temp_file.cc ('k') | chrome/browser/web_applications/web_app_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698