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

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: put dependency back for installer_util_nacl_win64 fixes compile?! 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
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #include "chrome/common/logging_chrome.h" 92 #include "chrome/common/logging_chrome.h"
93 #include "chrome/common/pepper_permission_util.h" 93 #include "chrome/common/pepper_permission_util.h"
94 #include "chrome/common/pref_names.h" 94 #include "chrome/common/pref_names.h"
95 #include "chrome/common/render_messages.h" 95 #include "chrome/common/render_messages.h"
96 #include "chrome/common/url_constants.h" 96 #include "chrome/common/url_constants.h"
97 #include "chrome/installer/util/google_update_settings.h" 97 #include "chrome/installer/util/google_update_settings.h"
98 #include "chromeos/chromeos_constants.h" 98 #include "chromeos/chromeos_constants.h"
99 #include "components/cdm/browser/cdm_message_filter_android.h" 99 #include "components/cdm/browser/cdm_message_filter_android.h"
100 #include "components/cloud_devices/common/cloud_devices_switches.h" 100 #include "components/cloud_devices/common/cloud_devices_switches.h"
101 #include "components/google/core/browser/google_util.h" 101 #include "components/google/core/browser/google_util.h"
102 #include "components/metrics/client_info.h"
102 #include "components/nacl/browser/nacl_browser.h" 103 #include "components/nacl/browser/nacl_browser.h"
103 #include "components/nacl/browser/nacl_host_message_filter.h" 104 #include "components/nacl/browser/nacl_host_message_filter.h"
104 #include "components/nacl/browser/nacl_process_host.h" 105 #include "components/nacl/browser/nacl_process_host.h"
105 #include "components/nacl/common/nacl_process_type.h" 106 #include "components/nacl/common/nacl_process_type.h"
106 #include "components/nacl/common/nacl_switches.h" 107 #include "components/nacl/common/nacl_switches.h"
107 #include "components/pref_registry/pref_registry_syncable.h" 108 #include "components/pref_registry/pref_registry_syncable.h"
108 #include "components/signin/core/common/profile_management_switches.h" 109 #include "components/signin/core/common/profile_management_switches.h"
109 #include "components/translate/core/common/translate_switches.h" 110 #include "components/translate/core/common/translate_switches.h"
110 #include "content/public/browser/browser_child_process_host.h" 111 #include "content/public/browser/browser_child_process_host.h"
111 #include "content/public/browser/browser_main_parts.h" 112 #include "content/public/browser/browser_main_parts.h"
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 } 1463 }
1463 return group == "Enabled"; 1464 return group == "Enabled";
1464 } 1465 }
1465 1466
1466 } // namespace 1467 } // namespace
1467 1468
1468 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 1469 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
1469 CommandLine* command_line, int child_process_id) { 1470 CommandLine* command_line, int child_process_id) {
1470 #if defined(OS_POSIX) 1471 #if defined(OS_POSIX)
1471 if (breakpad::IsCrashReporterEnabled()) { 1472 if (breakpad::IsCrashReporterEnabled()) {
1472 std::string enable_crash_reporter; 1473 scoped_ptr<metrics::ClientInfo> client_info =
1473 GoogleUpdateSettings::LoadMetricsClientId(&enable_crash_reporter); 1474 GoogleUpdateSettings::LoadMetricsClientInfo();
1474 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, 1475 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
1475 enable_crash_reporter); 1476 client_info ? client_info->client_id
1477 : std::string());
1476 } 1478 }
1477 #endif // defined(OS_POSIX) 1479 #endif // defined(OS_POSIX)
1478 1480
1479 if (logging::DialogsAreSuppressed()) 1481 if (logging::DialogsAreSuppressed())
1480 command_line->AppendSwitch(switches::kNoErrorDialogs); 1482 command_line->AppendSwitch(switches::kNoErrorDialogs);
1481 1483
1482 std::string process_type = 1484 std::string process_type =
1483 command_line->GetSwitchValueASCII(switches::kProcessType); 1485 command_line->GetSwitchValueASCII(switches::kProcessType);
1484 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 1486 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
1485 1487
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after
2806 switches::kDisableWebRtcEncryption, 2808 switches::kDisableWebRtcEncryption,
2807 }; 2809 };
2808 to_command_line->CopySwitchesFrom(from_command_line, 2810 to_command_line->CopySwitchesFrom(from_command_line,
2809 kWebRtcDevSwitchNames, 2811 kWebRtcDevSwitchNames,
2810 arraysize(kWebRtcDevSwitchNames)); 2812 arraysize(kWebRtcDevSwitchNames));
2811 } 2813 }
2812 } 2814 }
2813 #endif // defined(ENABLE_WEBRTC) 2815 #endif // defined(ENABLE_WEBRTC)
2814 2816
2815 } // namespace chrome 2817 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698