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

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

Issue 10542023: Disable modifying extensions when in managed mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fixed Evan's nits Created 8 years, 6 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_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 30 matching lines...) Expand all
41 #include "chrome/browser/extensions/extension_protocols.h" 41 #include "chrome/browser/extensions/extension_protocols.h"
42 #include "chrome/browser/extensions/extension_service.h" 42 #include "chrome/browser/extensions/extension_service.h"
43 #include "chrome/browser/extensions/extensions_startup.h" 43 #include "chrome/browser/extensions/extensions_startup.h"
44 #include "chrome/browser/first_run/upgrade_util.h" 44 #include "chrome/browser/first_run/upgrade_util.h"
45 #include "chrome/browser/google/google_search_counter.h" 45 #include "chrome/browser/google/google_search_counter.h"
46 #include "chrome/browser/google/google_util.h" 46 #include "chrome/browser/google/google_util.h"
47 #include "chrome/browser/gpu_blacklist.h" 47 #include "chrome/browser/gpu_blacklist.h"
48 #include "chrome/browser/gpu_util.h" 48 #include "chrome/browser/gpu_util.h"
49 #include "chrome/browser/jankometer.h" 49 #include "chrome/browser/jankometer.h"
50 #include "chrome/browser/language_usage_metrics.h" 50 #include "chrome/browser/language_usage_metrics.h"
51 #include "chrome/browser/managed_mode.h"
51 #include "chrome/browser/metrics/field_trial_synchronizer.h" 52 #include "chrome/browser/metrics/field_trial_synchronizer.h"
52 #include "chrome/browser/metrics/histogram_synchronizer.h" 53 #include "chrome/browser/metrics/histogram_synchronizer.h"
53 #include "chrome/browser/metrics/metrics_log.h" 54 #include "chrome/browser/metrics/metrics_log.h"
54 #include "chrome/browser/metrics/metrics_service.h" 55 #include "chrome/browser/metrics/metrics_service.h"
55 #include "chrome/browser/metrics/thread_watcher.h" 56 #include "chrome/browser/metrics/thread_watcher.h"
56 #include "chrome/browser/metrics/tracking_synchronizer.h" 57 #include "chrome/browser/metrics/tracking_synchronizer.h"
57 #include "chrome/browser/metrics/variations_service.h" 58 #include "chrome/browser/metrics/variations_service.h"
58 #include "chrome/browser/nacl_host/nacl_process_host.h" 59 #include "chrome/browser/nacl_host/nacl_process_host.h"
59 #include "chrome/browser/net/chrome_net_log.h" 60 #include "chrome/browser/net/chrome_net_log.h"
60 #include "chrome/browser/net/predictor.h" 61 #include "chrome/browser/net/predictor.h"
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 if (!parsed_command_line().HasSwitch(switches::kChromeFrame) && 1615 if (!parsed_command_line().HasSwitch(switches::kChromeFrame) &&
1615 ChromeBrowserMainPartsWin::CheckMachineLevelInstall()) { 1616 ChromeBrowserMainPartsWin::CheckMachineLevelInstall()) {
1616 return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS; 1617 return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS;
1617 } 1618 }
1618 #endif 1619 #endif
1619 1620
1620 // Create the TranslateManager singleton. 1621 // Create the TranslateManager singleton.
1621 translate_manager_ = TranslateManager::GetInstance(); 1622 translate_manager_ = TranslateManager::GetInstance();
1622 DCHECK(translate_manager_ != NULL); 1623 DCHECK(translate_manager_ != NULL);
1623 1624
1624 // TODO(stevenjb): Move WIN and MACOSX specific code to apprpriate Parts. 1625 // Initialize Managed Mode.
1626 ManagedMode::Init(profile_);
1627
1628 // TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts.
1625 // (requires supporting early exit). 1629 // (requires supporting early exit).
1626 PostProfileInit(); 1630 PostProfileInit();
1627 1631
1628 // Show the First Run UI if this is the first time Chrome has been run on 1632 // Show the First Run UI if this is the first time Chrome has been run on
1629 // this computer, or we're being compelled to do so by a command line flag. 1633 // this computer, or we're being compelled to do so by a command line flag.
1630 // Note that this be done _after_ the PrefService is initialized and all 1634 // Note that this be done _after_ the PrefService is initialized and all
1631 // preferences are registered, since some of the code that the importer 1635 // preferences are registered, since some of the code that the importer
1632 // touches reads preferences. 1636 // touches reads preferences.
1633 if (is_first_run_) { 1637 if (is_first_run_) {
1634 if (!first_run_ui_bypass_) { 1638 if (!first_run_ui_bypass_) {
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 if (base::win::GetVersion() <= base::win::VERSION_XP) 2031 if (base::win::GetVersion() <= base::win::VERSION_XP)
2028 uma_name += "_XP"; 2032 uma_name += "_XP";
2029 2033
2030 uma_name += "_PreRead_"; 2034 uma_name += "_PreRead_";
2031 uma_name += pre_read_percentage; 2035 uma_name += pre_read_percentage;
2032 AddPreReadHistogramTime(uma_name.c_str(), time); 2036 AddPreReadHistogramTime(uma_name.c_str(), time);
2033 } 2037 }
2034 #endif 2038 #endif
2035 #endif 2039 #endif
2036 } 2040 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/extension_managed_mode_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698