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

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

Issue 372473004: Retrieve client_id from GoogleUpdateSettings when its missing from Local State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits:grt Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/client_util.cc ('k') | chrome/browser/google/google_update_settings_posix.cc » ('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_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "chrome/common/logging_chrome.h" 94 #include "chrome/common/logging_chrome.h"
95 #include "chrome/common/pepper_permission_util.h" 95 #include "chrome/common/pepper_permission_util.h"
96 #include "chrome/common/pref_names.h" 96 #include "chrome/common/pref_names.h"
97 #include "chrome/common/render_messages.h" 97 #include "chrome/common/render_messages.h"
98 #include "chrome/common/url_constants.h" 98 #include "chrome/common/url_constants.h"
99 #include "chrome/installer/util/google_update_settings.h" 99 #include "chrome/installer/util/google_update_settings.h"
100 #include "chromeos/chromeos_constants.h" 100 #include "chromeos/chromeos_constants.h"
101 #include "components/cdm/browser/cdm_message_filter_android.h" 101 #include "components/cdm/browser/cdm_message_filter_android.h"
102 #include "components/cloud_devices/common/cloud_devices_switches.h" 102 #include "components/cloud_devices/common/cloud_devices_switches.h"
103 #include "components/google/core/browser/google_util.h" 103 #include "components/google/core/browser/google_util.h"
104 #include "components/metrics/client_info.h"
104 #include "components/pref_registry/pref_registry_syncable.h" 105 #include "components/pref_registry/pref_registry_syncable.h"
105 #include "components/signin/core/common/profile_management_switches.h" 106 #include "components/signin/core/common/profile_management_switches.h"
106 #include "components/translate/core/common/translate_switches.h" 107 #include "components/translate/core/common/translate_switches.h"
107 #include "content/public/browser/browser_child_process_host.h" 108 #include "content/public/browser/browser_child_process_host.h"
108 #include "content/public/browser/browser_main_parts.h" 109 #include "content/public/browser/browser_main_parts.h"
109 #include "content/public/browser/browser_ppapi_host.h" 110 #include "content/public/browser/browser_ppapi_host.h"
110 #include "content/public/browser/browser_thread.h" 111 #include "content/public/browser/browser_thread.h"
111 #include "content/public/browser/browser_url_handler.h" 112 #include "content/public/browser/browser_url_handler.h"
112 #include "content/public/browser/child_process_data.h" 113 #include "content/public/browser/child_process_data.h"
113 #include "content/public/browser/child_process_security_policy.h" 114 #include "content/public/browser/child_process_security_policy.h"
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 } 1479 }
1479 return group == "Enabled"; 1480 return group == "Enabled";
1480 } 1481 }
1481 1482
1482 } // namespace 1483 } // namespace
1483 1484
1484 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 1485 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
1485 CommandLine* command_line, int child_process_id) { 1486 CommandLine* command_line, int child_process_id) {
1486 #if defined(OS_POSIX) 1487 #if defined(OS_POSIX)
1487 if (breakpad::IsCrashReporterEnabled()) { 1488 if (breakpad::IsCrashReporterEnabled()) {
1488 std::string enable_crash_reporter; 1489 scoped_ptr<metrics::ClientInfo> client_info =
1489 GoogleUpdateSettings::LoadMetricsClientId(&enable_crash_reporter); 1490 GoogleUpdateSettings::LoadMetricsClientInfo();
1490 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, 1491 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
1491 enable_crash_reporter); 1492 client_info ? client_info->client_id
1493 : std::string());
1492 } 1494 }
1493 #endif // defined(OS_POSIX) 1495 #endif // defined(OS_POSIX)
1494 1496
1495 if (logging::DialogsAreSuppressed()) 1497 if (logging::DialogsAreSuppressed())
1496 command_line->AppendSwitch(switches::kNoErrorDialogs); 1498 command_line->AppendSwitch(switches::kNoErrorDialogs);
1497 1499
1498 std::string process_type = 1500 std::string process_type =
1499 command_line->GetSwitchValueASCII(switches::kProcessType); 1501 command_line->GetSwitchValueASCII(switches::kProcessType);
1500 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 1502 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
1501 1503
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
2929 switches::kDisableWebRtcEncryption, 2931 switches::kDisableWebRtcEncryption,
2930 }; 2932 };
2931 to_command_line->CopySwitchesFrom(from_command_line, 2933 to_command_line->CopySwitchesFrom(from_command_line,
2932 kWebRtcDevSwitchNames, 2934 kWebRtcDevSwitchNames,
2933 arraysize(kWebRtcDevSwitchNames)); 2935 arraysize(kWebRtcDevSwitchNames));
2934 } 2936 }
2935 } 2937 }
2936 #endif // defined(ENABLE_WEBRTC) 2938 #endif // defined(ENABLE_WEBRTC)
2937 2939
2938 } // namespace chrome 2940 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/app/client_util.cc ('k') | chrome/browser/google/google_update_settings_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698