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

Side by Side Diff: chrome/browser/ui/location_bar/origin_chip_info.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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/location_bar/origin_chip_info.h" 5 #include "chrome/browser/ui/location_bar/origin_chip_info.h"
6 6
7 #include <string>
8
7 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
8 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_service.h" 12 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/browser/extensions/extension_util.h" 13 #include "chrome/browser/extensions/extension_util.h"
12 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/safe_browsing/client_side_detection_host.h" 15 #include "chrome/browser/safe_browsing/client_side_detection_host.h"
14 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" 16 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h"
15 #include "chrome/browser/ui/toolbar/toolbar_model.h" 17 #include "chrome/browser/ui/toolbar/toolbar_model.h"
16 #include "chrome/common/extensions/extension_constants.h" 18 #include "chrome/common/extensions/extension_constants.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 url.SchemeIs(url::kMailToScheme) || 248 url.SchemeIs(url::kMailToScheme) ||
247 url.SchemeIs(content::kMetadataScheme) || 249 url.SchemeIs(content::kMetadataScheme) ||
248 url.SchemeIs(content::kSwappedOutScheme)) { 250 url.SchemeIs(content::kSwappedOutScheme)) {
249 std::string truncated_url; 251 std::string truncated_url;
250 base::TruncateUTF8ToByteSize(url.spec(), 1000, &truncated_url); 252 base::TruncateUTF8ToByteSize(url.spec(), 1000, &truncated_url);
251 return base::UTF8ToUTF16(truncated_url); 253 return base::UTF8ToUTF16(truncated_url);
252 } 254 }
253 255
254 #if defined(OS_CHROMEOS) 256 #if defined(OS_CHROMEOS)
255 if (url.SchemeIs(chrome::kCrosScheme) || 257 if (url.SchemeIs(chrome::kCrosScheme) ||
256 url.SchemeIs(chrome::kDriveScheme)) 258 url.SchemeIs(chrome::kExternalFileScheme))
257 return base::UTF8ToUTF16(url.spec()); 259 return base::UTF8ToUTF16(url.spec());
258 #endif 260 #endif
259 261
260 // If all else fails, return the hostname. 262 // If all else fails, return the hostname.
261 return base::UTF8ToUTF16(url.host()); 263 return base::UTF8ToUTF16(url.host());
262 } 264 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698