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

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 217008: Update the TabContents::SavePage parameter to take FilePath instead of wstrin... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: ToT Created 11 years, 2 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/message_box_flags.h" 10 #include "app/message_box_flags.h"
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 } 1505 }
1506 AutomationMsg_PrintNow::WriteReplyParams(reply_message, false); 1506 AutomationMsg_PrintNow::WriteReplyParams(reply_message, false);
1507 Send(reply_message); 1507 Send(reply_message);
1508 #else 1508 #else
1509 // TODO(port): Remove once DocumentPrintedNotificationObserver is implemented. 1509 // TODO(port): Remove once DocumentPrintedNotificationObserver is implemented.
1510 NOTIMPLEMENTED(); 1510 NOTIMPLEMENTED();
1511 #endif // defined(OS_WIN) 1511 #endif // defined(OS_WIN)
1512 } 1512 }
1513 1513
1514 void AutomationProvider::SavePage(int tab_handle, 1514 void AutomationProvider::SavePage(int tab_handle,
1515 const std::wstring& file_name, 1515 const FilePath& file_name,
1516 const std::wstring& dir_path, 1516 const FilePath& dir_path,
1517 int type, 1517 int type,
1518 bool* success) { 1518 bool* success) {
1519 if (!tab_tracker_->ContainsHandle(tab_handle)) { 1519 if (!tab_tracker_->ContainsHandle(tab_handle)) {
1520 *success = false; 1520 *success = false;
1521 return; 1521 return;
1522 } 1522 }
1523 1523
1524 NavigationController* nav = tab_tracker_->GetResource(tab_handle); 1524 NavigationController* nav = tab_tracker_->GetResource(tab_handle);
1525 Browser* browser = FindAndActivateTab(nav); 1525 Browser* browser = FindAndActivateTab(nav);
1526 DCHECK(browser); 1526 DCHECK(browser);
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 for (;iter != BrowserList::end(); ++iter) { 2053 for (;iter != BrowserList::end(); ++iter) {
2054 gfx::NativeWindow this_window = (*iter)->window()->GetNativeHandle(); 2054 gfx::NativeWindow this_window = (*iter)->window()->GetNativeHandle();
2055 if (window == this_window) { 2055 if (window == this_window) {
2056 // Add() returns the existing handle for the resource if any. 2056 // Add() returns the existing handle for the resource if any.
2057 *browser_handle = browser_tracker_->Add(*iter); 2057 *browser_handle = browser_tracker_->Add(*iter);
2058 *success = true; 2058 *success = true;
2059 return; 2059 return;
2060 } 2060 }
2061 } 2061 }
2062 } 2062 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.h ('k') | chrome/browser/browser_encoding_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698