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

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

Issue 6625037: Make the toast more reliable and less dangerous... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 } 1226 }
1227 1227
1228 #if defined(TOOLKIT_GTK) 1228 #if defined(TOOLKIT_GTK)
1229 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); 1229 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str());
1230 #endif 1230 #endif
1231 1231
1232 std::string try_chrome = 1232 std::string try_chrome =
1233 parsed_command_line.GetSwitchValueASCII(switches::kTryChromeAgain); 1233 parsed_command_line.GetSwitchValueASCII(switches::kTryChromeAgain);
1234 if (!try_chrome.empty()) { 1234 if (!try_chrome.empty()) {
1235 #if defined(OS_WIN) 1235 #if defined(OS_WIN)
1236 // Setup.exe has determined that we need to run a retention experiment
1237 // and has lauched chrome to show the experiment UI.
1238 if (process_singleton.FoundOtherProcessWindow()) {
1239 // It seems that we don't need to run the experiment since chrome
1240 // in the same profile is already running.
1241 VLOG(1) << "Retention experiment not required";
1242 return Upgrade::TD_NOT_NOW;
1243 }
1236 int try_chrome_int; 1244 int try_chrome_int;
1237 base::StringToInt(try_chrome, &try_chrome_int); 1245 base::StringToInt(try_chrome, &try_chrome_int);
1238 Upgrade::TryResult answer = Upgrade::ShowTryChromeDialog(try_chrome_int); 1246 Upgrade::TryResult answer =
1247 Upgrade::ShowTryChromeDialog(try_chrome_int, &process_singleton);
1239 if (answer == Upgrade::TD_NOT_NOW) 1248 if (answer == Upgrade::TD_NOT_NOW)
1240 return ResultCodes::NORMAL_EXIT_CANCEL; 1249 return ResultCodes::NORMAL_EXIT_CANCEL;
1241 if (answer == Upgrade::TD_UNINSTALL_CHROME) 1250 if (answer == Upgrade::TD_UNINSTALL_CHROME)
1242 return ResultCodes::NORMAL_EXIT_EXP2; 1251 return ResultCodes::NORMAL_EXIT_EXP2;
1243 #else 1252 #else
1244 // We don't support retention experiments on Mac or Linux. 1253 // We don't support retention experiments on Mac or Linux.
1245 return ResultCodes::NORMAL_EXIT; 1254 return ResultCodes::NORMAL_EXIT;
1246 #endif // defined(OS_WIN) 1255 #endif // defined(OS_WIN)
1247 } 1256 }
1248 1257
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 #if defined(OS_CHROMEOS) 1860 #if defined(OS_CHROMEOS)
1852 // To be precise, logout (browser shutdown) is not yet done, but the 1861 // To be precise, logout (browser shutdown) is not yet done, but the
1853 // remaining work is negligible, hence we say LogoutDone here. 1862 // remaining work is negligible, hence we say LogoutDone here.
1854 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1863 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1855 false); 1864 false);
1856 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1865 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1857 #endif 1866 #endif
1858 TRACE_EVENT_END("BrowserMain", 0, 0); 1867 TRACE_EVENT_END("BrowserMain", 0, 0);
1859 return result_code; 1868 return result_code;
1860 } 1869 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.h » ('j') | chrome/browser/first_run/first_run.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698