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

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

Issue 1257633002: Componentize VersionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert version_info::Channel to a "class enum" Created 5 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2340 matching lines...) Expand 10 before | Expand all | Expand 10 after
2351 #if defined(OS_WIN) 2351 #if defined(OS_WIN)
2352 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { 2352 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() {
2353 return chrome::kBrowserResourcesDll; 2353 return chrome::kBrowserResourcesDll;
2354 } 2354 }
2355 2355
2356 base::string16 ChromeContentBrowserClient::GetAppContainerSidForSandboxType( 2356 base::string16 ChromeContentBrowserClient::GetAppContainerSidForSandboxType(
2357 int sandbox_type) const { 2357 int sandbox_type) const {
2358 base::string16 sid; 2358 base::string16 sid;
2359 2359
2360 #if defined(GOOGLE_CHROME_BUILD) 2360 #if defined(GOOGLE_CHROME_BUILD)
2361 const chrome::VersionInfo::Channel channel = 2361 const version_info::Channel channel =
2362 chrome::VersionInfo::GetChannel(); 2362 chrome::VersionInfo::GetChannel();
2363 2363
2364 // It's possible to have a SxS installation running at the same time as a 2364 // It's possible to have a SxS installation running at the same time as a
2365 // non-SxS so isolate them from each other. 2365 // non-SxS so isolate them from each other.
2366 if (channel == chrome::VersionInfo::CHANNEL_CANARY) { 2366 if (channel == version_info::Channel::CANARY) {
2367 sid.assign( 2367 sid.assign(
2368 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-" 2368 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-"
2369 L"924012150-"); 2369 L"924012150-");
2370 } else { 2370 } else {
2371 sid.assign( 2371 sid.assign(
2372 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-" 2372 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-"
2373 L"924012149-"); 2373 L"924012149-");
2374 } 2374 }
2375 #else 2375 #else
2376 sid.assign( 2376 sid.assign(
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2544 if (prerender_manager && 2544 if (prerender_manager &&
2545 prerender_manager->IsWebContentsPrerendering(web_contents, nullptr)) { 2545 prerender_manager->IsWebContentsPrerendering(web_contents, nullptr)) {
2546 *visibility_state = blink::WebPageVisibilityStatePrerender; 2546 *visibility_state = blink::WebPageVisibilityStatePrerender;
2547 } 2547 }
2548 } 2548 }
2549 2549
2550 #if defined(ENABLE_WEBRTC) 2550 #if defined(ENABLE_WEBRTC)
2551 void ChromeContentBrowserClient::MaybeCopyDisableWebRtcEncryptionSwitch( 2551 void ChromeContentBrowserClient::MaybeCopyDisableWebRtcEncryptionSwitch(
2552 base::CommandLine* to_command_line, 2552 base::CommandLine* to_command_line,
2553 const base::CommandLine& from_command_line, 2553 const base::CommandLine& from_command_line,
2554 VersionInfo::Channel channel) { 2554 version_info::Channel channel) {
2555 #if defined(OS_ANDROID) 2555 #if defined(OS_ANDROID)
2556 const VersionInfo::Channel kMaxDisableEncryptionChannel = 2556 const version_info::Channel kMaxDisableEncryptionChannel =
2557 VersionInfo::CHANNEL_BETA; 2557 version_info::Channel::BETA;
2558 #else 2558 #else
2559 const VersionInfo::Channel kMaxDisableEncryptionChannel = 2559 const version_info::Channel kMaxDisableEncryptionChannel =
2560 VersionInfo::CHANNEL_DEV; 2560 version_info::Channel::DEV;
2561 #endif 2561 #endif
2562 if (channel <= kMaxDisableEncryptionChannel) { 2562 if (channel <= kMaxDisableEncryptionChannel) {
2563 static const char* const kWebRtcDevSwitchNames[] = { 2563 static const char* const kWebRtcDevSwitchNames[] = {
2564 switches::kDisableWebRtcEncryption, 2564 switches::kDisableWebRtcEncryption,
2565 }; 2565 };
2566 to_command_line->CopySwitchesFrom(from_command_line, 2566 to_command_line->CopySwitchesFrom(from_command_line,
2567 kWebRtcDevSwitchNames, 2567 kWebRtcDevSwitchNames,
2568 arraysize(kWebRtcDevSwitchNames)); 2568 arraysize(kWebRtcDevSwitchNames));
2569 } 2569 }
2570 } 2570 }
2571 #endif // defined(ENABLE_WEBRTC) 2571 #endif // defined(ENABLE_WEBRTC)
2572 2572
2573 } // namespace chrome 2573 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/chrome_content_browser_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698