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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 10877006: Rename GDataErrorCode to DriveErrorCode, GDataFileError to DriveFileError (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 8 years, 4 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/webui/print_preview/print_preview_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void PrintToPdfCallback(Metafile* metafile, const FilePath& path) { 214 void PrintToPdfCallback(Metafile* metafile, const FilePath& path) {
215 metafile->SaveTo(path); 215 metafile->SaveTo(path);
216 // |metafile| must be deleted on the UI thread. 216 // |metafile| must be deleted on the UI thread.
217 BrowserThread::PostTask( 217 BrowserThread::PostTask(
218 BrowserThread::UI, FROM_HERE, 218 BrowserThread::UI, FROM_HERE,
219 base::Bind(&base::DeletePointer<Metafile>, metafile)); 219 base::Bind(&base::DeletePointer<Metafile>, metafile));
220 } 220 }
221 221
222 #ifdef OS_CHROMEOS 222 #ifdef OS_CHROMEOS
223 void PrintToPdfCallbackWithCheck(Metafile* metafile, 223 void PrintToPdfCallbackWithCheck(Metafile* metafile,
224 gdata::GDataFileError error, 224 gdata::DriveFileError error,
225 const FilePath& path) { 225 const FilePath& path) {
226 if (error != gdata::GDATA_FILE_OK) { 226 if (error != gdata::DRIVE_FILE_OK) {
227 LOG(ERROR) << "Save to pdf failed to write: " << error; 227 LOG(ERROR) << "Save to pdf failed to write: " << error;
228 } else { 228 } else {
229 metafile->SaveTo(path); 229 metafile->SaveTo(path);
230 } 230 }
231 // |metafile| must be deleted on the UI thread. 231 // |metafile| must be deleted on the UI thread.
232 BrowserThread::PostTask( 232 BrowserThread::PostTask(
233 BrowserThread::UI, FROM_HERE, 233 BrowserThread::UI, FROM_HERE,
234 base::Bind(&base::DeletePointer<Metafile>, metafile)); 234 base::Bind(&base::DeletePointer<Metafile>, metafile));
235 } 235 }
236 #endif 236 #endif
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 return; 961 return;
962 962
963 // We no longer require the initiator tab details. Remove those details 963 // We no longer require the initiator tab details. Remove those details
964 // associated with the preview tab to allow the initiator tab to create 964 // associated with the preview tab to allow the initiator tab to create
965 // another preview tab. 965 // another preview tab.
966 printing::PrintPreviewTabController* tab_controller = 966 printing::PrintPreviewTabController* tab_controller =
967 printing::PrintPreviewTabController::GetInstance(); 967 printing::PrintPreviewTabController::GetInstance();
968 if (tab_controller) 968 if (tab_controller)
969 tab_controller->EraseInitiatorTabInfo(preview_tab_contents()); 969 tab_controller->EraseInitiatorTabInfo(preview_tab_contents());
970 } 970 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698