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

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

Issue 580023003: Rename the drive: scheme with the externalfile: scheme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 #if defined(OS_WIN) 198 #if defined(OS_WIN)
199 #include "base/win/metro.h" 199 #include "base/win/metro.h"
200 #include "chrome/browser/ssl/ssl_error_info.h" 200 #include "chrome/browser/ssl/ssl_error_info.h"
201 #include "chrome/browser/task_manager/task_manager.h" 201 #include "chrome/browser/task_manager/task_manager.h"
202 #include "chrome/browser/ui/view_ids.h" 202 #include "chrome/browser/ui/view_ids.h"
203 #include "components/autofill/core/browser/autofill_ie_toolbar_import_win.h" 203 #include "components/autofill/core/browser/autofill_ie_toolbar_import_win.h"
204 #include "ui/base/win/shell.h" 204 #include "ui/base/win/shell.h"
205 #endif // OS_WIN 205 #endif // OS_WIN
206 206
207 #if defined(OS_CHROMEOS) 207 #if defined(OS_CHROMEOS)
208 #include "chrome/browser/chromeos/drive/file_system_util.h" 208 #include "chrome/browser/chromeos/fileapi/external_file_url_util.h"
209 #endif 209 #endif
210 210
211 #if defined(USE_ASH) 211 #if defined(USE_ASH)
212 #include "ash/ash_switches.h" 212 #include "ash/ash_switches.h"
213 #endif 213 #endif
214 214
215 using base::TimeDelta; 215 using base::TimeDelta;
216 using base::UserMetricsAction; 216 using base::UserMetricsAction;
217 using content::NativeWebKeyboardEvent; 217 using content::NativeWebKeyboardEvent;
218 using content::NavigationController; 218 using content::NavigationController;
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 } 1916 }
1917 1917
1918 void Browser::FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file_info, 1918 void Browser::FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file_info,
1919 int index, 1919 int index,
1920 void* params) { 1920 void* params) {
1921 profile_->set_last_selected_directory(file_info.file_path.DirName()); 1921 profile_->set_last_selected_directory(file_info.file_path.DirName());
1922 1922
1923 GURL url = net::FilePathToFileURL(file_info.local_path); 1923 GURL url = net::FilePathToFileURL(file_info.local_path);
1924 1924
1925 #if defined(OS_CHROMEOS) 1925 #if defined(OS_CHROMEOS)
1926 drive::util::MaybeSetDriveURL(profile_, file_info.file_path, &url); 1926 const GURL external_url =
1927 chromeos::CreateExternalFileURLFromPath(profile_, file_info.file_path);
1928 if (!external_url.is_empty())
1929 url = external_url;
1927 #endif 1930 #endif
1928 1931
1929 if (url.is_empty()) 1932 if (url.is_empty())
1930 return; 1933 return;
1931 1934
1932 OpenURL(OpenURLParams( 1935 OpenURL(OpenURLParams(
1933 url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); 1936 url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false));
1934 } 1937 }
1935 1938
1936 /////////////////////////////////////////////////////////////////////////////// 1939 ///////////////////////////////////////////////////////////////////////////////
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 if (contents && !allow_js_access) { 2479 if (contents && !allow_js_access) {
2477 contents->web_contents()->GetController().LoadURL( 2480 contents->web_contents()->GetController().LoadURL(
2478 target_url, 2481 target_url,
2479 content::Referrer(), 2482 content::Referrer(),
2480 ui::PAGE_TRANSITION_LINK, 2483 ui::PAGE_TRANSITION_LINK,
2481 std::string()); // No extra headers. 2484 std::string()); // No extra headers.
2482 } 2485 }
2483 2486
2484 return contents != NULL; 2487 return contents != NULL;
2485 } 2488 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/ui/location_bar/origin_chip_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698