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

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

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/chrome_browser_main.h ('k') | chrome/browser/chrome_browser_main_android.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) 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_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include <set> 10 #include <set>
8 #include <string> 11 #include <string>
9 #include <vector> 12 #include <vector>
10 13
11 #include "base/at_exit.h" 14 #include "base/at_exit.h"
12 #include "base/base_switches.h" 15 #include "base/base_switches.h"
13 #include "base/bind.h" 16 #include "base/bind.h"
14 #include "base/command_line.h" 17 #include "base/command_line.h"
15 #include "base/debug/crash_logging.h" 18 #include "base/debug/crash_logging.h"
16 #include "base/debug/debugger.h" 19 #include "base/debug/debugger.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 bool ProcessSingletonNotificationCallback( 500 bool ProcessSingletonNotificationCallback(
498 const base::CommandLine& command_line, 501 const base::CommandLine& command_line,
499 const base::FilePath& current_directory) { 502 const base::FilePath& current_directory) {
500 // Drop the request if the browser process is already in shutdown path. 503 // Drop the request if the browser process is already in shutdown path.
501 if (!g_browser_process || g_browser_process->IsShuttingDown()) 504 if (!g_browser_process || g_browser_process->IsShuttingDown())
502 return false; 505 return false;
503 506
504 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) { 507 if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) {
505 std::string start_time_string = 508 std::string start_time_string =
506 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime); 509 command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime);
507 int64 remote_start_time; 510 int64_t remote_start_time;
508 if (base::StringToInt64(start_time_string, &remote_start_time)) { 511 if (base::StringToInt64(start_time_string, &remote_start_time)) {
509 base::TimeDelta elapsed = 512 base::TimeDelta elapsed =
510 base::Time::Now() - base::Time::FromInternalValue(remote_start_time); 513 base::Time::Now() - base::Time::FromInternalValue(remote_start_time);
511 if (command_line.HasSwitch(switches::kFastStart)) { 514 if (command_line.HasSwitch(switches::kFastStart)) {
512 UMA_HISTOGRAM_LONG_TIMES( 515 UMA_HISTOGRAM_LONG_TIMES(
513 "Startup.WarmStartTimeFromRemoteProcessStartFast", elapsed); 516 "Startup.WarmStartTimeFromRemoteProcessStartFast", elapsed);
514 } else { 517 } else {
515 UMA_HISTOGRAM_LONG_TIMES( 518 UMA_HISTOGRAM_LONG_TIMES(
516 "Startup.WarmStartTimeFromRemoteProcessStart", elapsed); 519 "Startup.WarmStartTimeFromRemoteProcessStart", elapsed);
517 } 520 }
(...skipping 14 matching lines...) Expand all
532 } 535 }
533 #endif // !defined(OS_ANDROID) 536 #endif // !defined(OS_ANDROID)
534 537
535 void LaunchDevToolsHandlerIfNeeded(const base::CommandLine& command_line) { 538 void LaunchDevToolsHandlerIfNeeded(const base::CommandLine& command_line) {
536 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) { 539 if (command_line.HasSwitch(::switches::kRemoteDebuggingPort)) {
537 std::string port_str = 540 std::string port_str =
538 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort); 541 command_line.GetSwitchValueASCII(::switches::kRemoteDebuggingPort);
539 int port; 542 int port;
540 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) { 543 if (base::StringToInt(port_str, &port) && port >= 0 && port < 65535) {
541 g_browser_process->CreateDevToolsHttpProtocolHandler( 544 g_browser_process->CreateDevToolsHttpProtocolHandler(
542 chrome::HOST_DESKTOP_TYPE_NATIVE, 545 chrome::HOST_DESKTOP_TYPE_NATIVE, "127.0.0.1",
543 "127.0.0.1", 546 static_cast<uint16_t>(port));
544 static_cast<uint16>(port));
545 } else { 547 } else {
546 DLOG(WARNING) << "Invalid http debugger port number " << port; 548 DLOG(WARNING) << "Invalid http debugger port number " << port;
547 } 549 }
548 } 550 }
549 } 551 }
550 552
551 class ScopedMainMessageLoopRunEvent { 553 class ScopedMainMessageLoopRunEvent {
552 public: 554 public:
553 ScopedMainMessageLoopRunEvent() { 555 ScopedMainMessageLoopRunEvent() {
554 TRACE_EVENT_ASYNC_BEGIN0( 556 TRACE_EVENT_ASYNC_BEGIN0(
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1908 chromeos::CrosSettings::Shutdown(); 1910 chromeos::CrosSettings::Shutdown();
1909 #endif // defined(OS_CHROMEOS) 1911 #endif // defined(OS_CHROMEOS)
1910 #endif // defined(OS_ANDROID) 1912 #endif // defined(OS_ANDROID)
1911 } 1913 }
1912 1914
1913 // Public members: 1915 // Public members:
1914 1916
1915 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1917 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1916 chrome_extra_parts_.push_back(parts); 1918 chrome_extra_parts_.push_back(parts);
1917 } 1919 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_browser_main_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698