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

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

Issue 10826108: Inactive user toast. Set chrome as default. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 return TryChromeDialogView::NOT_NOW; 787 return TryChromeDialogView::NOT_NOW;
788 } 788 }
789 int try_chrome_int; 789 int try_chrome_int;
790 base::StringToInt(try_chrome, &try_chrome_int); 790 base::StringToInt(try_chrome, &try_chrome_int);
791 TryChromeDialogView::Result answer = 791 TryChromeDialogView::Result answer =
792 TryChromeDialogView::Show(try_chrome_int, process_singleton_.get()); 792 TryChromeDialogView::Show(try_chrome_int, process_singleton_.get());
793 if (answer == TryChromeDialogView::NOT_NOW) 793 if (answer == TryChromeDialogView::NOT_NOW)
794 return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL; 794 return chrome::RESULT_CODE_NORMAL_EXIT_CANCEL;
795 if (answer == TryChromeDialogView::UNINSTALL_CHROME) 795 if (answer == TryChromeDialogView::UNINSTALL_CHROME)
796 return chrome::RESULT_CODE_NORMAL_EXIT_EXP2; 796 return chrome::RESULT_CODE_NORMAL_EXIT_EXP2;
797 // At this point the user is willing to try chrome again.
798 if (answer == TryChromeDialogView::TRY_CHROME_AS_DEFAULT) {
799 // Only set in the unattended case, the interactive case is Windows 8.
800 if (ShellIntegration::CanSetAsDefaultBrowser() ==
801 ShellIntegration::SET_DEFAULT_UNATTENDED)
802 ShellIntegration::SetAsDefaultBrowser();
803 }
797 #else 804 #else
798 // We don't support retention experiments on Mac or Linux. 805 // We don't support retention experiments on Mac or Linux.
799 return content::RESULT_CODE_NORMAL_EXIT; 806 return content::RESULT_CODE_NORMAL_EXIT;
800 #endif // defined(OS_WIN) 807 #endif // defined(OS_WIN)
801 } 808 }
802 809
803 // On first run, we need to process the predictor preferences before the 810 // On first run, we need to process the predictor preferences before the
804 // browser's profile_manager object is created, but after ResourceBundle 811 // browser's profile_manager object is created, but after ResourceBundle
805 // is initialized. 812 // is initialized.
806 first_run_ui_bypass_ = false; // True to skip first run UI. 813 first_run_ui_bypass_ = false; // True to skip first run UI.
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 if (base::win::GetVersion() <= base::win::VERSION_XP) 1518 if (base::win::GetVersion() <= base::win::VERSION_XP)
1512 uma_name += "_XP"; 1519 uma_name += "_XP";
1513 1520
1514 uma_name += "_PreRead_"; 1521 uma_name += "_PreRead_";
1515 uma_name += pre_read_percentage; 1522 uma_name += pre_read_percentage;
1516 AddPreReadHistogramTime(uma_name.c_str(), time); 1523 AddPreReadHistogramTime(uma_name.c_str(), time);
1517 } 1524 }
1518 #endif 1525 #endif
1519 #endif 1526 #endif
1520 } 1527 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698