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

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

Issue 17032: * switch download manager to using FilePath... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 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 | « base/file_util.cc ('k') | chrome/browser/download/download_file.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/path_service.h" 7 #include "base/path_service.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/browser/automation/automation_provider_list.h" 9 #include "chrome/browser/automation/automation_provider_list.h"
10 #include "chrome/browser/automation/ui_controls.h" 10 #include "chrome/browser/automation/ui_controls.h"
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 } 1902 }
1903 1903
1904 void AutomationProvider::GetDownloadDirectory(const IPC::Message& message, 1904 void AutomationProvider::GetDownloadDirectory(const IPC::Message& message,
1905 int handle) { 1905 int handle) {
1906 DLOG(INFO) << "Handling download directory request"; 1906 DLOG(INFO) << "Handling download directory request";
1907 std::wstring download_directory; 1907 std::wstring download_directory;
1908 if (tab_tracker_->ContainsHandle(handle)) { 1908 if (tab_tracker_->ContainsHandle(handle)) {
1909 NavigationController* tab = tab_tracker_->GetResource(handle); 1909 NavigationController* tab = tab_tracker_->GetResource(handle);
1910 DownloadManager* dlm = tab->profile()->GetDownloadManager(); 1910 DownloadManager* dlm = tab->profile()->GetDownloadManager();
1911 DCHECK(dlm); 1911 DCHECK(dlm);
1912 download_directory = dlm->download_path(); 1912 download_directory = dlm->download_path().ToWStringHack();
1913 } 1913 }
1914 1914
1915 Send(new AutomationMsg_DownloadDirectoryResponse(message.routing_id(), 1915 Send(new AutomationMsg_DownloadDirectoryResponse(message.routing_id(),
1916 download_directory)); 1916 download_directory));
1917 } 1917 }
1918 1918
1919 void AutomationProvider::OpenNewBrowserWindow(int show_command) { 1919 void AutomationProvider::OpenNewBrowserWindow(int show_command) {
1920 // We may have no current browser windows open so don't rely on 1920 // We may have no current browser windows open so don't rely on
1921 // asking an existing browser to execute the IDC_NEWWINDOW command 1921 // asking an existing browser to execute the IDC_NEWWINDOW command
1922 Browser* browser = Browser::Create(profile_); 1922 Browser* browser = Browser::Create(profile_);
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 CharacterEncoding::GetCommandIdByCanonicalEncodingName(encoding_name); 2577 CharacterEncoding::GetCommandIdByCanonicalEncodingName(encoding_name);
2578 if (selected_encoding_id) { 2578 if (selected_encoding_id) {
2579 browser->OverrideEncoding(selected_encoding_id); 2579 browser->OverrideEncoding(selected_encoding_id);
2580 succeed = true; 2580 succeed = true;
2581 } 2581 }
2582 } 2582 }
2583 } 2583 }
2584 Send(new AutomationMsg_OverrideEncodingResponse(message.routing_id(), 2584 Send(new AutomationMsg_OverrideEncodingResponse(message.routing_id(),
2585 succeed)); 2585 succeed));
2586 } 2586 }
OLDNEW
« no previous file with comments | « base/file_util.cc ('k') | chrome/browser/download/download_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698