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

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

Issue 10905142: Rename GData to Drive in drive_file_system_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/extensions/webstore_installer.cc ('k') | chrome/browser/ui/browser.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/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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 const FilePath& local_path) { 134 const FilePath& local_path) {
135 if (error != gdata::DRIVE_FILE_OK) { 135 if (error != gdata::DRIVE_FILE_OK) {
136 LOG(ERROR) << "Failed to write screenshot image to Google Drive: " << error; 136 LOG(ERROR) << "Failed to write screenshot image to Google Drive: " << error;
137 return; 137 return;
138 } 138 }
139 SaveScreenshot(local_path, png_data); 139 SaveScreenshot(local_path, png_data);
140 } 140 }
141 141
142 void PostSaveScreenshotTask(const FilePath& screenshot_path, 142 void PostSaveScreenshotTask(const FilePath& screenshot_path,
143 scoped_refptr<base::RefCountedBytes> png_data) { 143 scoped_refptr<base::RefCountedBytes> png_data) {
144 if (gdata::util::IsUnderGDataMountPoint(screenshot_path)) { 144 if (gdata::util::IsUnderDriveMountPoint(screenshot_path)) {
145 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 145 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
146 if (profile) { 146 if (profile) {
147 gdata::util::PrepareWritableFileAndRun( 147 gdata::util::PrepareWritableFileAndRun(
148 profile, 148 profile,
149 screenshot_path, 149 screenshot_path,
150 base::Bind(&SaveScreenshotToGData, png_data)); 150 base::Bind(&SaveScreenshotToGData, png_data));
151 } 151 }
152 } else { 152 } else {
153 content::BrowserThread::PostTask( 153 content::BrowserThread::PostTask(
154 content::BrowserThread::FILE, FROM_HERE, 154 content::BrowserThread::FILE, FROM_HERE,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 ash::internal::kShellWindowId_OverlayContainer)->layer(); 259 ash::internal::kShellWindowId_OverlayContainer)->layer();
260 parent->Add(visual_feedback_layer_.get()); 260 parent->Add(visual_feedback_layer_.get());
261 visual_feedback_layer_->SetVisible(true); 261 visual_feedback_layer_->SetVisible(true);
262 262
263 MessageLoopForUI::current()->PostDelayedTask( 263 MessageLoopForUI::current()->PostDelayedTask(
264 FROM_HERE, 264 FROM_HERE,
265 base::Bind(&ScreenshotTaker::CloseVisualFeedbackLayer, 265 base::Bind(&ScreenshotTaker::CloseVisualFeedbackLayer,
266 base::Unretained(this)), 266 base::Unretained(this)),
267 base::TimeDelta::FromMilliseconds(kVisualFeedbackLayerDisplayTimeMs)); 267 base::TimeDelta::FromMilliseconds(kVisualFeedbackLayerDisplayTimeMs));
268 } 268 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698