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

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: fixed. 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 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 } 1917 }
1918 1918
1919 void Browser::FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file_info, 1919 void Browser::FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file_info,
1920 int index, 1920 int index,
1921 void* params) { 1921 void* params) {
1922 profile_->set_last_selected_directory(file_info.file_path.DirName()); 1922 profile_->set_last_selected_directory(file_info.file_path.DirName());
1923 1923
1924 GURL url = net::FilePathToFileURL(file_info.local_path); 1924 GURL url = net::FilePathToFileURL(file_info.local_path);
1925 1925
1926 #if defined(OS_CHROMEOS) 1926 #if defined(OS_CHROMEOS)
1927 drive::util::MaybeSetDriveURL(profile_, file_info.file_path, &url); 1927 const GURL external_url =
sky 2014/09/22 16:44:18 Is there a reason this is conditional? And do you
hirono 2014/09/23 09:25:17 Yes, In Chrome OS, some volumes are mapped to nati
1928 chromeos::CreateExternalFileURLFromPath(profile_, file_info.file_path);
1929 if (!external_url.is_empty())
1930 url = external_url;
1928 #endif 1931 #endif
1929 1932
1930 if (url.is_empty()) 1933 if (url.is_empty())
1931 return; 1934 return;
1932 1935
1933 OpenURL(OpenURLParams( 1936 OpenURL(OpenURLParams(
1934 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); 1937 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false));
1935 } 1938 }
1936 1939
1937 /////////////////////////////////////////////////////////////////////////////// 1940 ///////////////////////////////////////////////////////////////////////////////
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2477 if (contents && !allow_js_access) { 2480 if (contents && !allow_js_access) {
2478 contents->web_contents()->GetController().LoadURL( 2481 contents->web_contents()->GetController().LoadURL(
2479 target_url, 2482 target_url,
2480 content::Referrer(), 2483 content::Referrer(),
2481 content::PAGE_TRANSITION_LINK, 2484 content::PAGE_TRANSITION_LINK,
2482 std::string()); // No extra headers. 2485 std::string()); // No extra headers.
2483 } 2486 }
2484 2487
2485 return contents != NULL; 2488 return contents != NULL;
2486 } 2489 }
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