diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 20:25:18 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 20:25:18 +0000 |
commit | 4573fbd30d7ed70f959efb69b32ad9547465f0ce (patch) | |
tree | 958d424cf2dfa7b22aba942c8ebc383a5ba22517 /chrome | |
parent | 5262dc192af688c4f9301753fa7890975303b909 (diff) | |
download | chromium_src-4573fbd30d7ed70f959efb69b32ad9547465f0ce.zip chromium_src-4573fbd30d7ed70f959efb69b32ad9547465f0ce.tar.gz chromium_src-4573fbd30d7ed70f959efb69b32ad9547465f0ce.tar.bz2 |
Move content_restriction.h and main_function_params.h to content/public/common, and put them in the content namespace.
BUG=98716
Review URL: http://codereview.chromium.org/8387039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
30 files changed, 76 insertions, 61 deletions
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index 93ce114..b2c55a6 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -105,8 +105,8 @@ base::LazyInstance<chrome::ChromeContentUtilityClient> base::LazyInstance<chrome::ChromeContentPluginClient> g_chrome_content_plugin_client(base::LINKER_INITIALIZED); -extern int NaClMain(const MainFunctionParams&); -extern int ServiceProcessMain(const MainFunctionParams&); +extern int NaClMain(const content::MainFunctionParams&); +extern int ServiceProcessMain(const content::MainFunctionParams&); namespace { @@ -374,7 +374,7 @@ void SetUpProfilingShutdownHandler() { struct MainFunction { const char* name; - int (*function)(const MainFunctionParams&); + int (*function)(const content::MainFunctionParams&); }; } // namespace @@ -657,7 +657,7 @@ void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) { int ChromeMainDelegate::RunProcess( const std::string& process_type, - const MainFunctionParams& main_function_params) { + const content::MainFunctionParams& main_function_params) { static const MainFunction kMainFunctions[] = { { switches::kServiceProcess, ServiceProcessMain }, #if defined(OS_MACOSX) diff --git a/chrome/app/chrome_main_delegate.h b/chrome/app/chrome_main_delegate.h index 064b561..3e9b72a 100644 --- a/chrome/app/chrome_main_delegate.h +++ b/chrome/app/chrome_main_delegate.h @@ -28,7 +28,7 @@ class ChromeMainDelegate : public content::ContentMainDelegate { virtual void SandboxInitialized(const std::string& process_type) OVERRIDE; virtual int RunProcess( const std::string& process_type, - const MainFunctionParams& main_function_params) OVERRIDE; + const content::MainFunctionParams& main_function_params) OVERRIDE; virtual void ProcessExiting(const std::string& process_type) OVERRIDE; #if defined(OS_MACOSX) diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index ea45498..4844237 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -90,9 +90,9 @@ #include "chrome/installer/util/google_update_settings.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/common/child_process.h" -#include "content/common/main_function_params.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_client.h" +#include "content/public/common/main_function_params.h" #include "grit/app_locale_settings.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -413,7 +413,7 @@ PrefService* InitializeLocalState(const CommandLine& parsed_command_line, // Initializes the profile, possibly doing some user prompting to pick a // fallback profile. Returns the newly created profile, or NULL if startup // should not continue. -Profile* CreateProfile(const MainFunctionParams& parameters, +Profile* CreateProfile(const content::MainFunctionParams& parameters, const FilePath& user_data_dir, const CommandLine& parsed_command_line) { Profile* profile; @@ -686,7 +686,7 @@ const char kMissingLocaleDataMessage[] = // BrowserMainParts ------------------------------------------------------------ ChromeBrowserMainParts::ChromeBrowserMainParts( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : parameters_(parameters), parsed_command_line_(parameters.command_line), result_code_(content::RESULT_CODE_NORMAL_EXIT), diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h index 817e8de..13f0675 100644 --- a/chrome/browser/chrome_browser_main.h +++ b/chrome/browser/chrome_browser_main.h @@ -23,7 +23,6 @@ class PrefService; class Profile; class ShutdownWatcherHelper; class TranslateManager; -struct MainFunctionParams; namespace chrome_browser { // For use by ShowMissingLocaleMessageBox. @@ -31,6 +30,10 @@ extern const char kMissingLocaleDataTitle[]; extern const char kMissingLocaleDataMessage[]; } +namespace content { +struct MainFunctionParams; +} + class ChromeBrowserMainParts : public content::BrowserMainParts { public: virtual ~ChromeBrowserMainParts(); @@ -40,7 +43,7 @@ class ChromeBrowserMainParts : public content::BrowserMainParts { // switches. MetricsService* SetupMetricsAndFieldTrials(PrefService* local_state); - const MainFunctionParams& parameters() const { + const content::MainFunctionParams& parameters() const { return parameters_; } const CommandLine& parsed_command_line() const { @@ -48,7 +51,8 @@ class ChromeBrowserMainParts : public content::BrowserMainParts { } protected: - explicit ChromeBrowserMainParts(const MainFunctionParams& parameters); + explicit ChromeBrowserMainParts( + const content::MainFunctionParams& parameters); // content::BrowserParts overrides virtual void PreEarlyInitialization() OVERRIDE {} @@ -109,7 +113,7 @@ class ChromeBrowserMainParts : public content::BrowserMainParts { // Members initialized on construction --------------------------------------- - const MainFunctionParams& parameters_; + const content::MainFunctionParams& parameters_; const CommandLine& parsed_command_line_; int result_code_; diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc index 8e595ee..295533d 100644 --- a/chrome/browser/chrome_browser_main_linux.cc +++ b/chrome/browser/chrome_browser_main_linux.cc @@ -12,7 +12,7 @@ #endif ChromeBrowserMainPartsLinux::ChromeBrowserMainPartsLinux( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : ChromeBrowserMainPartsPosix(parameters) { } diff --git a/chrome/browser/chrome_browser_main_linux.h b/chrome/browser/chrome_browser_main_linux.h index 80f3e55..e9f3bee 100644 --- a/chrome/browser/chrome_browser_main_linux.h +++ b/chrome/browser/chrome_browser_main_linux.h @@ -13,7 +13,8 @@ class ChromeBrowserMainPartsLinux : public ChromeBrowserMainPartsPosix { public: - explicit ChromeBrowserMainPartsLinux(const MainFunctionParams& parameters); + explicit ChromeBrowserMainPartsLinux( + const content::MainFunctionParams& parameters); // ChromeBrowserMainParts overrides. virtual void ShowMissingLocaleMessageBox() OVERRIDE; diff --git a/chrome/browser/chrome_browser_main_mac.h b/chrome/browser/chrome_browser_main_mac.h index 2ba7e7b..dc08bbf 100644 --- a/chrome/browser/chrome_browser_main_mac.h +++ b/chrome/browser/chrome_browser_main_mac.h @@ -10,7 +10,8 @@ class ChromeBrowserMainPartsMac : public ChromeBrowserMainPartsPosix { public: - explicit ChromeBrowserMainPartsMac(const MainFunctionParams& parameters); + explicit ChromeBrowserMainPartsMac( + const content::MainFunctionParams& parameters); // BrowserParts overrides. virtual void PreEarlyInitialization() OVERRIDE; diff --git a/chrome/browser/chrome_browser_main_mac.mm b/chrome/browser/chrome_browser_main_mac.mm index 99428ee..02c9d05 100644 --- a/chrome/browser/chrome_browser_main_mac.mm +++ b/chrome/browser/chrome_browser_main_mac.mm @@ -19,7 +19,7 @@ #include "chrome/browser/metrics/metrics_service.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" -#include "content/common/main_function_params.h" +#include "content/public/common/main_function_params.h" #include "content/public/common/result_codes.h" #include "ui/base/l10n/l10n_util_mac.h" #include "ui/base/resource/resource_bundle.h" @@ -46,7 +46,7 @@ int DoUninstallTasks(bool chrome_still_running) { // ChromeBrowserMainPartsMac --------------------------------------------------- ChromeBrowserMainPartsMac::ChromeBrowserMainPartsMac( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : ChromeBrowserMainPartsPosix(parameters) { } diff --git a/chrome/browser/chrome_browser_main_posix.cc b/chrome/browser/chrome_browser_main_posix.cc index 2a9fe0e..1a53281 100644 --- a/chrome/browser/chrome_browser_main_posix.cc +++ b/chrome/browser/chrome_browser_main_posix.cc @@ -187,7 +187,7 @@ void SetFileDescriptorLimit(unsigned int max_descriptors) { // ChromeBrowserMainPartsPosix ------------------------------------------------- ChromeBrowserMainPartsPosix::ChromeBrowserMainPartsPosix( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : ChromeBrowserMainParts(parameters) { } diff --git a/chrome/browser/chrome_browser_main_posix.h b/chrome/browser/chrome_browser_main_posix.h index 79a6566..6188de7 100644 --- a/chrome/browser/chrome_browser_main_posix.h +++ b/chrome/browser/chrome_browser_main_posix.h @@ -9,7 +9,8 @@ class ChromeBrowserMainPartsPosix : public ChromeBrowserMainParts { public: - explicit ChromeBrowserMainPartsPosix(const MainFunctionParams& parameters); + explicit ChromeBrowserMainPartsPosix( + const content::MainFunctionParams& parameters); virtual void PreEarlyInitialization() OVERRIDE; virtual void PostMainMessageLoopStart() OVERRIDE; diff --git a/chrome/browser/chrome_browser_main_unittest.cc b/chrome/browser/chrome_browser_main_unittest.cc index e682c9c..4a2f265 100644 --- a/chrome/browser/chrome_browser_main_unittest.cc +++ b/chrome/browser/chrome_browser_main_unittest.cc @@ -11,8 +11,8 @@ #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/testing_pref_service.h" -#include "content/common/main_function_params.h" #include "content/public/browser/content_browser_client.h" +#include "content/public/common/main_function_params.h" #include "net/socket/client_socket_pool_base.h" #include "testing/gtest/include/gtest/gtest.h" @@ -28,7 +28,8 @@ class BrowserMainTest : public testing::Test { TEST_F(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket) { command_line_.AppendSwitchASCII(switches::kSocketReusePolicy, "0"); - scoped_ptr<MainFunctionParams> params(new MainFunctionParams(command_line_)); + scoped_ptr<content::MainFunctionParams> params( + new content::MainFunctionParams(command_line_)); ScopedVector<content::BrowserMainParts> bwv; content::GetContentClient()->browser()->CreateBrowserMainParts( *params, &(bwv.get())); @@ -43,7 +44,8 @@ TEST_F(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket) { } TEST_F(BrowserMainTest, WarmConnectionFieldTrial_Random) { - scoped_ptr<MainFunctionParams> params(new MainFunctionParams(command_line_)); + scoped_ptr<content::MainFunctionParams> params( + new content::MainFunctionParams(command_line_)); ScopedVector<content::BrowserMainParts> bwv; content::GetContentClient()->browser()->CreateBrowserMainParts( *params, &(bwv.get())); @@ -65,7 +67,8 @@ TEST_F(BrowserMainTest, WarmConnectionFieldTrial_Random) { TEST_F(BrowserMainTest, WarmConnectionFieldTrial_Invalid) { command_line_.AppendSwitchASCII(switches::kSocketReusePolicy, "100"); - scoped_ptr<MainFunctionParams> params(new MainFunctionParams(command_line_)); + scoped_ptr<content::MainFunctionParams> params( + new content::MainFunctionParams(command_line_)); // This test ends up launching a new process, and that doesn't initialize the // ContentClient interfaces. ScopedVector<content::BrowserMainParts> bwv; diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc index 6064a00..2af430b 100644 --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc @@ -31,7 +31,7 @@ #include "chrome/installer/util/helper.h" #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/shell_util.h" -#include "content/common/main_function_params.h" +#include "content/public/common/main_function_params.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -136,7 +136,7 @@ int DoUninstallTasks(bool chrome_still_running) { // ChromeBrowserMainPartsWin --------------------------------------------------- ChromeBrowserMainPartsWin::ChromeBrowserMainPartsWin( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : ChromeBrowserMainParts(parameters) { } diff --git a/chrome/browser/chrome_browser_main_win.h b/chrome/browser/chrome_browser_main_win.h index f54f557..dddda5d 100644 --- a/chrome/browser/chrome_browser_main_win.h +++ b/chrome/browser/chrome_browser_main_win.h @@ -19,7 +19,8 @@ int DoUninstallTasks(bool chrome_still_running); class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts { public: - explicit ChromeBrowserMainPartsWin(const MainFunctionParams& parameters); + explicit ChromeBrowserMainPartsWin( + const content::MainFunctionParams& parameters); // BrowserParts overrides. virtual void PreMainMessageLoopStart() OVERRIDE; diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 032bfce..727c953 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -202,7 +202,7 @@ RenderProcessHostPrivilege GetProcessPrivilege( namespace chrome { void ChromeContentBrowserClient::CreateBrowserMainParts( - const MainFunctionParams& parameters, + const content::MainFunctionParams& parameters, std::vector<content::BrowserMainParts*>* parts_list) { // Construct the Main browser parts based on the OS type. #if defined(OS_WIN) diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index 4d4e0ec6..35368e1 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h @@ -16,7 +16,7 @@ namespace chrome { class ChromeContentBrowserClient : public content::ContentBrowserClient { public: virtual void CreateBrowserMainParts( - const MainFunctionParams& parameters, + const content::MainFunctionParams& parameters, std::vector<content::BrowserMainParts*>* parts_list) OVERRIDE; virtual RenderWidgetHostView* CreateViewForWidget( RenderWidgetHost* widget) OVERRIDE; diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index cb897b0..c4126ea 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc @@ -20,7 +20,7 @@ #include "chrome/browser/chromeos/system/statistics_provider.h" #include "chrome/browser/defaults.h" #include "chrome/common/chrome_switches.h" -#include "content/common/main_function_params.h" +#include "content/public/common/main_function_params.h" #include "net/base/network_change_notifier.h" #if defined(TOOLKIT_USES_GTK) @@ -71,7 +71,7 @@ static base::LazyInstance<MessageLoopObserver> g_message_loop_observer( base::LINKER_INITIALIZED); ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : ChromeBrowserMainPartsLinux(parameters) { } diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.h b/chrome/browser/chromeos/chrome_browser_main_chromeos.h index 790477f..5190db1 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.h +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.h @@ -15,7 +15,8 @@ class SessionManagerObserver; class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux { public: - explicit ChromeBrowserMainPartsChromeos(const MainFunctionParams& parameters); + explicit ChromeBrowserMainPartsChromeos( + const content::MainFunctionParams& parameters); virtual ~ChromeBrowserMainPartsChromeos(); virtual void PreEarlyInitialization() OVERRIDE; diff --git a/chrome/browser/mac/relauncher.cc b/chrome/browser/mac/relauncher.cc index ee1af48..700f8da 100644 --- a/chrome/browser/mac/relauncher.cc +++ b/chrome/browser/mac/relauncher.cc @@ -28,9 +28,9 @@ #include "base/sys_string_conversions.h" #include "chrome/browser/mac/install_from_dmg.h" #include "chrome/common/chrome_switches.h" -#include "content/common/main_function_params.h" #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" +#include "content/public/common/main_function_params.h" // RTLD_MAIN_ONLY is supported as of Mac OS X 10.5, but <dlfcn.h> does not // define it in the 10.5 SDK. It is present in the 10.6 SDK and is documented @@ -255,7 +255,7 @@ void RelauncherSynchronizeWithParent() { namespace internal { -int RelauncherMain(const MainFunctionParams& main_parameters) { +int RelauncherMain(const content::MainFunctionParams& main_parameters) { // CommandLine rearranges the order of the arguments returned by // main_parameters.argv(), rendering it impossible to determine which // arguments originally came before kRelauncherArgSeparator and which came diff --git a/chrome/browser/mac/relauncher.h b/chrome/browser/mac/relauncher.h index 26ab08b..7ccdd9c 100644 --- a/chrome/browser/mac/relauncher.h +++ b/chrome/browser/mac/relauncher.h @@ -33,7 +33,9 @@ #include <string> #include <vector> +namespace content { struct MainFunctionParams; +} namespace mac_relauncher { @@ -73,7 +75,7 @@ namespace internal { // The entry point from ChromeMain into the relauncher process. This is not a // user API. Don't call it if your name isn't ChromeMain. -int RelauncherMain(const MainFunctionParams& main_parameters); +int RelauncherMain(const content::MainFunctionParams& main_parameters); } // namespace internal diff --git a/chrome/browser/printing/print_preview_message_handler.cc b/chrome/browser/printing/print_preview_message_handler.cc index 55348f6..51d9956 100644 --- a/chrome/browser/printing/print_preview_message_handler.cc +++ b/chrome/browser/printing/print_preview_message_handler.cc @@ -21,8 +21,8 @@ #include "chrome/common/print_messages.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/content_restriction.h" #include "content/public/browser/browser_thread.h" +#include "content/public/common/content_restriction.h" #include "printing/page_size_margins.h" #include "printing/print_job_constants.h" @@ -245,7 +245,7 @@ bool PrintPreviewMessageHandler::OnMessageReceived( void PrintPreviewMessageHandler::DidStartLoading() { if (tab_contents()->delegate() && PrintPreviewTabController::IsPrintPreviewTab(tab_contents_wrapper())) { - tab_contents()->SetContentRestrictions(CONTENT_RESTRICTION_PRINT); + tab_contents()->SetContentRestrictions(content::CONTENT_RESTRICTION_PRINT); } } diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 01af4ed..a137dea 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -64,8 +64,8 @@ #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/user_metrics.h" -#include "content/common/content_restriction.h" #include "content/public/browser/notification_service.h" +#include "content/public/common/content_restriction.h" #include "grit/generated_resources.h" #include "net/base/escape.h" #include "net/base/net_util.h" @@ -1000,13 +1000,13 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const { if (id == IDC_PRINT && (source_tab_contents_->content_restrictions() & - CONTENT_RESTRICTION_PRINT)) { + content::CONTENT_RESTRICTION_PRINT)) { return false; } if (id == IDC_SAVE_PAGE && (source_tab_contents_->content_restrictions() & - CONTENT_RESTRICTION_SAVE)) { + content::CONTENT_RESTRICTION_SAVE)) { return false; } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index e6000a3..13ea20a9 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -149,9 +149,9 @@ #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents_view.h" #include "content/browser/user_metrics.h" -#include "content/common/content_restriction.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_details.h" +#include "content/public/common/content_restriction.h" #include "content/public/common/content_switches.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -4727,11 +4727,11 @@ void Browser::UpdateCommandsForContentRestrictionState() { int restrictions = GetContentRestrictionsForSelectedTab(); command_updater_.UpdateCommandEnabled( - IDC_COPY, !(restrictions & CONTENT_RESTRICTION_COPY)); + IDC_COPY, !(restrictions & content::CONTENT_RESTRICTION_COPY)); command_updater_.UpdateCommandEnabled( - IDC_CUT, !(restrictions & CONTENT_RESTRICTION_CUT)); + IDC_CUT, !(restrictions & content::CONTENT_RESTRICTION_CUT)); command_updater_.UpdateCommandEnabled( - IDC_PASTE, !(restrictions & CONTENT_RESTRICTION_PASTE)); + IDC_PASTE, !(restrictions & content::CONTENT_RESTRICTION_PASTE)); UpdateSaveAsState(restrictions); UpdatePrintingState(restrictions); } @@ -4750,7 +4750,7 @@ void Browser::UpdatePrintingState(int content_restrictions) { bool has_constrained_window = (wrapper && wrapper->constrained_window_tab_helper()->constrained_window_count()); if (has_constrained_window || - content_restrictions & CONTENT_RESTRICTION_PRINT) { + content_restrictions & content::CONTENT_RESTRICTION_PRINT) { print_enabled = false; advanced_print_enabled = false; } @@ -4816,7 +4816,7 @@ void Browser::MarkHomePageAsChanged(PrefService* pref_service) { } void Browser::UpdateSaveAsState(int content_restrictions) { - bool enabled = !(content_restrictions & CONTENT_RESTRICTION_SAVE); + bool enabled = !(content_restrictions & content::CONTENT_RESTRICTION_SAVE); PrefService* state = g_browser_process->local_state(); if (state) enabled = enabled && state->GetBoolean(prefs::kAllowFileSelectionDialogs); @@ -5382,7 +5382,7 @@ int Browser::GetContentRestrictionsForSelectedTab() { NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); // See comment in UpdateCommandsForTabState about why we call url(). if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) - content_restrictions |= CONTENT_RESTRICTION_SAVE; + content_restrictions |= content::CONTENT_RESTRICTION_SAVE; } return content_restrictions; } diff --git a/chrome/nacl/nacl_exe_win_64.cc b/chrome/nacl/nacl_exe_win_64.cc index c347c7b..9bddf80 100644 --- a/chrome/nacl/nacl_exe_win_64.cc +++ b/chrome/nacl/nacl_exe_win_64.cc @@ -17,16 +17,16 @@ #include "chrome/nacl/nacl_listener.h" #include "chrome/nacl/nacl_main_platform_delegate.h" #include "content/common/hi_res_timer_manager.h" -#include "content/common/main_function_params.h" #include "content/public/app/startup_helper_win.h" +#include "content/public/common/main_function_params.h" #include "content/public/common/sandbox_init.h" #include "sandbox/src/sandbox_types.h" -extern int NaClMain(const MainFunctionParams&); +extern int NaClMain(const content::MainFunctionParams&); // main() routine for the NaCl broker process. // This is necessary for supporting NaCl in Chrome on Win64. -int NaClBrokerMain(const MainFunctionParams& parameters) { +int NaClBrokerMain(const content::MainFunctionParams& parameters) { const CommandLine& parsed_command_line = parameters.command_line; MessageLoopForIO main_message_loop; @@ -67,7 +67,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { // Die if the sandbox can't be enabled. CHECK(sandbox_initialized_ok) << "Error initializing sandbox for " << process_type; - MainFunctionParams main_params(command_line); + content::MainFunctionParams main_params(command_line); main_params.sandbox_info = &sandbox_info; if (process_type == switches::kNaClLoaderProcess) diff --git a/chrome/nacl/nacl_helper_linux.cc b/chrome/nacl/nacl_helper_linux.cc index 3f8646f..a90b589 100644 --- a/chrome/nacl/nacl_helper_linux.cc +++ b/chrome/nacl/nacl_helper_linux.cc @@ -15,12 +15,12 @@ #include <vector> #include "base/at_exit.h" +#include "base/command_line.h" #include "base/eintr_wrapper.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/rand_util.h" #include "chrome/nacl/nacl_listener.h" -#include "content/common/main_function_params.h" #include "content/common/unix_domain_socket_posix.h" #include "ipc/ipc_switches.h" #include "native_client/src/trusted/service_runtime/sel_memory.h" diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc index 87e37eb..3029dbb 100644 --- a/chrome/nacl/nacl_main.cc +++ b/chrome/nacl/nacl_main.cc @@ -14,7 +14,7 @@ #include "chrome/nacl/nacl_main_platform_delegate.h" #include "content/common/child_process.h" #include "content/common/hi_res_timer_manager.h" -#include "content/common/main_function_params.h" +#include "content/public/common/main_function_params.h" // This function provides some ways to test crash and assertion handling // behavior of the renderer. @@ -29,7 +29,7 @@ static void HandleNaClTestParameters(const CommandLine& command_line) { } // main() routine for the NaCl loader process. -int NaClMain(const MainFunctionParams& parameters) { +int NaClMain(const content::MainFunctionParams& parameters) { const CommandLine& parsed_command_line = parameters.command_line; // This function allows pausing execution using the --nacl-startup-dialog diff --git a/chrome/nacl/nacl_main_platform_delegate.h b/chrome/nacl/nacl_main_platform_delegate.h index b1c56f6..7979516 100644 --- a/chrome/nacl/nacl_main_platform_delegate.h +++ b/chrome/nacl/nacl_main_platform_delegate.h @@ -7,14 +7,15 @@ #pragma once #include "base/native_library.h" -#include "content/common/main_function_params.h" +#include "content/public/common/main_function_params.h" typedef bool (*RunNaClLoaderTests)(void); const char kNaClLoaderTestCall[] = "RunNaClLoaderTests"; class NaClMainPlatformDelegate { public: - explicit NaClMainPlatformDelegate(const MainFunctionParams& parameters); + explicit NaClMainPlatformDelegate( + const content::MainFunctionParams& parameters); ~NaClMainPlatformDelegate(); // Called first thing and last thing in the process' lifecycle, i.e. before @@ -35,7 +36,7 @@ class NaClMainPlatformDelegate { bool RunSandboxTests(); private: - const MainFunctionParams& parameters_; + const content::MainFunctionParams& parameters_; base::NativeLibrary sandbox_test_module_; DISALLOW_COPY_AND_ASSIGN(NaClMainPlatformDelegate); diff --git a/chrome/nacl/nacl_main_platform_delegate_linux.cc b/chrome/nacl/nacl_main_platform_delegate_linux.cc index d8e4b23..2941c55 100644 --- a/chrome/nacl/nacl_main_platform_delegate_linux.cc +++ b/chrome/nacl/nacl_main_platform_delegate_linux.cc @@ -8,7 +8,7 @@ #include "seccompsandbox/sandbox.h" NaClMainPlatformDelegate::NaClMainPlatformDelegate( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : parameters_(parameters), sandbox_test_module_(NULL) { } diff --git a/chrome/nacl/nacl_main_platform_delegate_mac.mm b/chrome/nacl/nacl_main_platform_delegate_mac.mm index c5eb65a..6e3121e 100644 --- a/chrome/nacl/nacl_main_platform_delegate_mac.mm +++ b/chrome/nacl/nacl_main_platform_delegate_mac.mm @@ -14,7 +14,7 @@ #include "content/public/common/sandbox_init.h" NaClMainPlatformDelegate::NaClMainPlatformDelegate( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : parameters_(parameters), sandbox_test_module_(NULL) { } diff --git a/chrome/nacl/nacl_main_platform_delegate_win.cc b/chrome/nacl/nacl_main_platform_delegate_win.cc index 1ce923e..d2ce5f3 100644 --- a/chrome/nacl/nacl_main_platform_delegate_win.cc +++ b/chrome/nacl/nacl_main_platform_delegate_win.cc @@ -12,7 +12,7 @@ #include "sandbox/src/sandbox.h" NaClMainPlatformDelegate::NaClMainPlatformDelegate( - const MainFunctionParams& parameters) + const content::MainFunctionParams& parameters) : parameters_(parameters), sandbox_test_module_(NULL) { } diff --git a/chrome/service/service_main.cc b/chrome/service/service_main.cc index 14f1362..99d6c83 100644 --- a/chrome/service/service_main.cc +++ b/chrome/service/service_main.cc @@ -7,7 +7,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/service_process_util.h" #include "chrome/service/service_process.h" -#include "content/common/main_function_params.h" +#include "content/public/common/main_function_params.h" #if defined(OS_WIN) #include "content/common/sandbox_policy.h" @@ -17,7 +17,7 @@ #endif // defined(OS_WIN) // Mainline routine for running as the service process. -int ServiceProcessMain(const MainFunctionParams& parameters) { +int ServiceProcessMain(const content::MainFunctionParams& parameters) { MessageLoopForUI main_message_loop; main_message_loop.set_thread_name("MainThread"); if (parameters.command_line.HasSwitch(switches::kWaitForDebugger)) { |