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

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

Issue 10675: Switch to avoid first-run pop-up from displaying while in app-mode. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 #include <shellapi.h> 6 #include <shellapi.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 std::wstring install_lang; 327 std::wstring install_lang;
328 if (GoogleUpdateSettings::GetLanguage(&install_lang)) 328 if (GoogleUpdateSettings::GetLanguage(&install_lang))
329 local_state->SetString(prefs::kApplicationLocale, install_lang); 329 local_state->SetString(prefs::kApplicationLocale, install_lang);
330 if (GoogleUpdateSettings::GetCollectStatsConsent()) 330 if (GoogleUpdateSettings::GetCollectStatsConsent())
331 local_state->SetBoolean(prefs::kMetricsReportingEnabled, true); 331 local_state->SetBoolean(prefs::kMetricsReportingEnabled, true);
332 // On first run, we need to process the master preferences before the 332 // On first run, we need to process the master preferences before the
333 // browser's profile_manager object is created. 333 // browser's profile_manager object is created.
334 first_run_ui_bypass = 334 first_run_ui_bypass =
335 !FirstRun::ProcessMasterPreferences(user_data_dir, 335 !FirstRun::ProcessMasterPreferences(user_data_dir,
336 std::wstring(), NULL); 336 std::wstring(), NULL);
337
338 // If we are running in App mode, we do not want to show the importer
339 // (first run) UI.
340 if (!first_run_ui_bypass && parsed_command_line.HasSwitch(switches::kApp))
341 first_run_ui_bypass = true;
337 } 342 }
338 343
339 ResourceBundle::InitSharedInstance( 344 ResourceBundle::InitSharedInstance(
340 local_state->GetString(prefs::kApplicationLocale)); 345 local_state->GetString(prefs::kApplicationLocale));
341 // We only load the theme dll in the browser process. 346 // We only load the theme dll in the browser process.
342 ResourceBundle::GetSharedInstance().LoadThemeResources(); 347 ResourceBundle::GetSharedInstance().LoadThemeResources();
343 348
344 if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) { 349 if (!parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) {
345 // Display a warning if the user is running windows 2000. 350 // Display a warning if the user is running windows 2000.
346 CheckForWin2000(); 351 CheckForWin2000();
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 // The following should ONLY be called when in single threaded mode. It is 588 // The following should ONLY be called when in single threaded mode. It is
584 // unsafe to do this cleanup if other threads are still active. 589 // unsafe to do this cleanup if other threads are still active.
585 // It is also very unnecessary, so I'm only doing this in debug to satisfy 590 // It is also very unnecessary, so I'm only doing this in debug to satisfy
586 // purify. 591 // purify.
587 if (tracking_objects) 592 if (tracking_objects)
588 tracked_objects::ThreadData::ShutdownSingleThreadedCleanup(); 593 tracked_objects::ThreadData::ShutdownSingleThreadedCleanup();
589 #endif // NDEBUG 594 #endif // NDEBUG
590 595
591 return result_code; 596 return result_code;
592 } 597 }
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