Carnitas: Move non-ui Mac files out of browser/ui/cocoa

This is a part of the larger change to remove includes of browser/ui/cocoa/* from code that's outside of browser/ui.

upgrade_detector.cc, browser_main.cc, and render_message_filter.cc were including files from browser/ui/cocoa/*. In this case all those files weren't actually UI related so I'm moving this out of browser/ui/cocoa and into browser/cocoa.

BUG=None
TEST=Compiling


Review URL: http://codereview.chromium.org/6312165

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74529 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 73d25ced..f359054 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -155,7 +155,7 @@
 
 #if defined(OS_MACOSX)
 #include <Security/Security.h>
-#include "chrome/browser/ui/cocoa/install_from_dmg.h"
+#include "chrome/browser/cocoa/install_from_dmg.h"
 #endif
 
 #if defined(TOOLKIT_VIEWS)
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm
index cd359a9..e47e268 100644
--- a/chrome/browser/browser_main_mac.mm
+++ b/chrome/browser/browser_main_mac.mm
@@ -18,7 +18,7 @@
 #import "chrome/browser/app_controller_mac.h"
 #include "chrome/browser/browser_main_win.h"
 #import "chrome/browser/chrome_browser_application_mac.h"
-#import "chrome/browser/ui/cocoa/keystone_glue.h"
+#import "chrome/browser/cocoa/keystone_glue.h"
 #include "chrome/browser/metrics/metrics_service.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/ui/cocoa/authorization_util.h b/chrome/browser/cocoa/authorization_util.h
similarity index 94%
rename from chrome/browser/ui/cocoa/authorization_util.h
rename to chrome/browser/cocoa/authorization_util.h
index 9694998b..d5daf4a 100644
--- a/chrome/browser/ui/cocoa/authorization_util.h
+++ b/chrome/browser/cocoa/authorization_util.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CHROME_BROWSER_UI_COCOA_AUTHORIZATION_UTIL_H_
-#define CHROME_BROWSER_UI_COCOA_AUTHORIZATION_UTIL_H_
+#ifndef CHROME_BROWSER_COCOA_AUTHORIZATION_UTIL_H_
+#define CHROME_BROWSER_COCOA_AUTHORIZATION_UTIL_H_
 #pragma once
 
 // AuthorizationExecuteWithPrivileges fork()s and exec()s the tool, but it
@@ -64,4 +64,4 @@
 
 }  // namespace authorization_util
 
-#endif  // CHROME_BROWSER_UI_COCOA_AUTHORIZATION_UTIL_H_
+#endif  // CHROME_BROWSER_COCOA_AUTHORIZATION_UTIL_H_
diff --git a/chrome/browser/ui/cocoa/authorization_util.mm b/chrome/browser/cocoa/authorization_util.mm
similarity index 97%
rename from chrome/browser/ui/cocoa/authorization_util.mm
rename to chrome/browser/cocoa/authorization_util.mm
index 9c434f3..81e9d4cc 100644
--- a/chrome/browser/ui/cocoa/authorization_util.mm
+++ b/chrome/browser/cocoa/authorization_util.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/ui/cocoa/authorization_util.h"
+#include "chrome/browser/cocoa/authorization_util.h"
 
 #import <Foundation/Foundation.h>
 #include <sys/wait.h>
@@ -15,7 +15,7 @@
 #import "base/mac/mac_util.h"
 #include "base/string_number_conversions.h"
 #include "base/string_util.h"
-#include "chrome/browser/ui/cocoa/scoped_authorizationref.h"
+#include "chrome/browser/cocoa/scoped_authorizationref.h"
 
 namespace authorization_util {
 
diff --git a/chrome/browser/ui/cocoa/install_from_dmg.h b/chrome/browser/cocoa/install_from_dmg.h
similarity index 76%
rename from chrome/browser/ui/cocoa/install_from_dmg.h
rename to chrome/browser/cocoa/install_from_dmg.h
index 0343cd0..ec9248a2 100644
--- a/chrome/browser/ui/cocoa/install_from_dmg.h
+++ b/chrome/browser/cocoa/install_from_dmg.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CHROME_BROWSER_UI_COCOA_INSTALL_FROM_DMG_H_
-#define CHROME_BROWSER_UI_COCOA_INSTALL_FROM_DMG_H_
+#ifndef CHROME_BROWSER_COCOA_INSTALL_FROM_DMG_H_
+#define CHROME_BROWSER_COCOA_INSTALL_FROM_DMG_H_
 #pragma once
 
 // If the application is running from a read-only disk image, prompts the user
@@ -12,4 +12,4 @@
 // true.  In that case, the caller must exit expeditiously.
 bool MaybeInstallFromDiskImage();
 
-#endif  // CHROME_BROWSER_UI_COCOA_INSTALL_FROM_DMG_H_
+#endif  // CHROME_BROWSER_COCOA_INSTALL_FROM_DMG_H_
diff --git a/chrome/browser/ui/cocoa/install_from_dmg.mm b/chrome/browser/cocoa/install_from_dmg.mm
similarity index 98%
rename from chrome/browser/ui/cocoa/install_from_dmg.mm
rename to chrome/browser/cocoa/install_from_dmg.mm
index d551b61..8af44f3 100644
--- a/chrome/browser/ui/cocoa/install_from_dmg.mm
+++ b/chrome/browser/cocoa/install_from_dmg.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/ui/cocoa/install_from_dmg.h"
+#include "chrome/browser/cocoa/install_from_dmg.h"
 
 #include <ApplicationServices/ApplicationServices.h>
 #import <AppKit/AppKit.h>
@@ -18,9 +18,9 @@
 #include "base/logging.h"
 #import "base/mac/mac_util.h"
 #include "base/mac/scoped_nsautorelease_pool.h"
-#include "chrome/browser/ui/cocoa/authorization_util.h"
-#include "chrome/browser/ui/cocoa/scoped_authorizationref.h"
-#import "chrome/browser/ui/cocoa/keystone_glue.h"
+#include "chrome/browser/cocoa/authorization_util.h"
+#include "chrome/browser/cocoa/scoped_authorizationref.h"
+#import "chrome/browser/cocoa/keystone_glue.h"
 #include "grit/chromium_strings.h"
 #include "grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/cocoa/keystone_glue.h b/chrome/browser/cocoa/keystone_glue.h
similarity index 97%
rename from chrome/browser/ui/cocoa/keystone_glue.h
rename to chrome/browser/cocoa/keystone_glue.h
index c20bdb4..69b5351 100644
--- a/chrome/browser/ui/cocoa/keystone_glue.h
+++ b/chrome/browser/cocoa/keystone_glue.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CHROME_BROWSER_UI_COCOA_KEYSTONE_GLUE_H_
-#define CHROME_BROWSER_UI_COCOA_KEYSTONE_GLUE_H_
+#ifndef CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_
+#define CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_
 #pragma once
 
 #include "base/string16.h"
@@ -13,7 +13,7 @@
 #import <Foundation/Foundation.h>
 
 #import "base/scoped_nsobject.h"
-#include "chrome/browser/ui/cocoa/scoped_authorizationref.h"
+#include "chrome/browser/cocoa/scoped_authorizationref.h"
 
 // Possible outcomes of various operations.  A version may accompany some of
 // these, but beware: a version is never required.  For statuses that can be
@@ -206,4 +206,4 @@
 
 }  // namespace keystone_glue
 
-#endif  // CHROME_BROWSER_UI_COCOA_KEYSTONE_GLUE_H_
+#endif  // CHROME_BROWSER_COCOA_KEYSTONE_GLUE_H_
diff --git a/chrome/browser/ui/cocoa/keystone_glue.mm b/chrome/browser/cocoa/keystone_glue.mm
similarity index 99%
rename from chrome/browser/ui/cocoa/keystone_glue.mm
rename to chrome/browser/cocoa/keystone_glue.mm
index 7f3ddd6..562d74a3 100644
--- a/chrome/browser/ui/cocoa/keystone_glue.mm
+++ b/chrome/browser/cocoa/keystone_glue.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "chrome/browser/ui/cocoa/keystone_glue.h"
+#import "chrome/browser/cocoa/keystone_glue.h"
 
 #include <sys/param.h>
 #include <sys/mount.h>
@@ -16,7 +16,7 @@
 #include "base/ref_counted.h"
 #include "base/task.h"
 #include "base/threading/worker_pool.h"
-#include "chrome/browser/ui/cocoa/authorization_util.h"
+#include "chrome/browser/cocoa/authorization_util.h"
 #include "chrome/common/chrome_constants.h"
 #include "grit/chromium_strings.h"
 #include "grit/generated_resources.h"
diff --git a/chrome/browser/ui/cocoa/keystone_glue_unittest.mm b/chrome/browser/cocoa/keystone_glue_unittest.mm
similarity index 98%
rename from chrome/browser/ui/cocoa/keystone_glue_unittest.mm
rename to chrome/browser/cocoa/keystone_glue_unittest.mm
index c4a26f4..9d49a09 100644
--- a/chrome/browser/ui/cocoa/keystone_glue_unittest.mm
+++ b/chrome/browser/cocoa/keystone_glue_unittest.mm
@@ -5,7 +5,7 @@
 #import <Foundation/Foundation.h>
 #import <objc/objc-class.h>
 
-#import "chrome/browser/ui/cocoa/keystone_glue.h"
+#import "chrome/browser/cocoa/keystone_glue.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/platform_test.h"
 
diff --git a/chrome/browser/ui/cocoa/scoped_authorizationref.h b/chrome/browser/cocoa/scoped_authorizationref.h
similarity index 91%
rename from chrome/browser/ui/cocoa/scoped_authorizationref.h
rename to chrome/browser/cocoa/scoped_authorizationref.h
index ae7edb3c..3ffa18b 100644
--- a/chrome/browser/ui/cocoa/scoped_authorizationref.h
+++ b/chrome/browser/cocoa/scoped_authorizationref.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CHROME_BROWSER_UI_COCOA_SCOPED_AUTHORIZATIONREF_H_
-#define CHROME_BROWSER_UI_COCOA_SCOPED_AUTHORIZATIONREF_H_
+#ifndef CHROME_BROWSER_COCOA_SCOPED_AUTHORIZATIONREF_H_
+#define CHROME_BROWSER_COCOA_SCOPED_AUTHORIZATIONREF_H_
 #pragma once
 
 #include <Security/Authorization.h>
@@ -77,4 +77,4 @@
   DISALLOW_COPY_AND_ASSIGN(scoped_AuthorizationRef);
 };
 
-#endif  // CHROME_BROWSER_UI_COCOA_SCOPED_AUTHORIZATIONREF_H_
+#endif  // CHROME_BROWSER_COCOA_SCOPED_AUTHORIZATIONREF_H_
diff --git a/chrome/browser/ui/cocoa/task_helpers.h b/chrome/browser/cocoa/task_helpers.h
similarity index 85%
rename from chrome/browser/ui/cocoa/task_helpers.h
rename to chrome/browser/cocoa/task_helpers.h
index e29c068..ecc40f3 100644
--- a/chrome/browser/ui/cocoa/task_helpers.h
+++ b/chrome/browser/cocoa/task_helpers.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CHROME_BROWSER_UI_COCOA_TASK_HELPERS_H_
-#define CHROME_BROWSER_UI_COCOA_TASK_HELPERS_H_
+#ifndef CHROME_BROWSER_COCOA_TASK_HELPERS_H_
+#define CHROME_BROWSER_COCOA_TASK_HELPERS_H_
 #pragma once
 
 class Task;
@@ -26,4 +26,4 @@
 
 }  // namespace cocoa_utils
 
-#endif  // CHROME_BROWSER_UI_COCOA_TASK_HELPERS_H_
+#endif  // CHROME_BROWSER_COCOA_TASK_HELPERS_H_
diff --git a/chrome/browser/ui/cocoa/task_helpers.mm b/chrome/browser/cocoa/task_helpers.mm
similarity index 96%
rename from chrome/browser/ui/cocoa/task_helpers.mm
rename to chrome/browser/cocoa/task_helpers.mm
index 2f8df18..7cc458b 100644
--- a/chrome/browser/ui/cocoa/task_helpers.mm
+++ b/chrome/browser/cocoa/task_helpers.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/ui/cocoa/task_helpers.h"
+#include "chrome/browser/cocoa/task_helpers.h"
 
 #import <Cocoa/Cocoa.h>
 
diff --git a/chrome/browser/renderer_host/render_message_filter.cc b/chrome/browser/renderer_host/render_message_filter.cc
index 4a1ba2f..7105495 100644
--- a/chrome/browser/renderer_host/render_message_filter.cc
+++ b/chrome/browser/renderer_host/render_message_filter.cc
@@ -74,7 +74,7 @@
 #include "chrome/browser/chromeos/plugin_selection_policy.h"
 #endif
 #if defined(OS_MACOSX)
-#include "chrome/browser/ui/cocoa/task_helpers.h"
+#include "chrome/browser/cocoa/task_helpers.h"
 #include "chrome/common/font_descriptor_mac.h"
 #include "chrome/common/font_loader_mac.h"
 #endif
diff --git a/chrome/browser/ui/cocoa/about_window_controller.mm b/chrome/browser/ui/cocoa/about_window_controller.mm
index 45a4df73..af08577 100644
--- a/chrome/browser/ui/cocoa/about_window_controller.mm
+++ b/chrome/browser/ui/cocoa/about_window_controller.mm
@@ -11,10 +11,10 @@
 #include "base/sys_string_conversions.h"
 #include "chrome/browser/browser_list.h"
 #include "chrome/browser/browser_window.h"
+#import "chrome/browser/cocoa/keystone_glue.h"
 #include "chrome/browser/google/google_util.h"
 #include "chrome/browser/platform_util.h"
 #import "chrome/browser/ui/cocoa/background_tile_view.h"
-#import "chrome/browser/ui/cocoa/keystone_glue.h"
 #include "chrome/browser/ui/cocoa/restart_browser.h"
 #include "chrome/common/url_constants.h"
 #include "grit/chromium_strings.h"
diff --git a/chrome/browser/ui/cocoa/about_window_controller_unittest.mm b/chrome/browser/ui/cocoa/about_window_controller_unittest.mm
index 4747efe..4b578092 100644
--- a/chrome/browser/ui/cocoa/about_window_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/about_window_controller_unittest.mm
@@ -5,10 +5,10 @@
 #import <Cocoa/Cocoa.h>
 
 #import "base/scoped_nsobject.h"
+#import "chrome/browser/cocoa/keystone_glue.h"
 #import "chrome/browser/ui/cocoa/about_window_controller.h"
 #include "chrome/browser/ui/cocoa/browser_test_helper.h"
 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
-#import "chrome/browser/ui/cocoa/keystone_glue.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #import "testing/gtest_mac.h"
 #include "testing/platform_test.h"
diff --git a/chrome/browser/ui/cocoa/keystone_infobar.mm b/chrome/browser/ui/cocoa/keystone_infobar.mm
index 7b2c2353..e71a401 100644
--- a/chrome/browser/ui/cocoa/keystone_infobar.mm
+++ b/chrome/browser/ui/cocoa/keystone_infobar.mm
@@ -11,6 +11,7 @@
 #include "base/command_line.h"
 #include "base/message_loop.h"
 #include "base/task.h"
+#import "chrome/browser/cocoa/keystone_glue.h"
 #include "chrome/browser/first_run/first_run.h"
 #include "chrome/browser/prefs/pref_service.h"
 #include "chrome/browser/profiles/profile.h"
@@ -19,7 +20,6 @@
 #include "chrome/browser/tab_contents/tab_contents.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_list.h"
-#import "chrome/browser/ui/cocoa/keystone_glue.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
 #include "grit/chromium_strings.h"
diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc
index 99d8a2bb..5588d4f 100644
--- a/chrome/browser/upgrade_detector.cc
+++ b/chrome/browser/upgrade_detector.cc
@@ -27,7 +27,7 @@
 #if defined(OS_WIN)
 #include "chrome/installer/util/install_util.h"
 #elif defined(OS_MACOSX)
-#include "chrome/browser/ui/cocoa/keystone_glue.h"
+#include "chrome/browser/cocoa/keystone_glue.h"
 #elif defined(OS_POSIX)
 #include "base/process_util.h"
 #include "base/version.h"
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 9556851..42525e89 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -794,6 +794,15 @@
         'browser/clipboard_dispatcher_gtk.cc',
         'browser/clipboard_dispatcher_mac.mm',
         'browser/clipboard_dispatcher_win.cc',
+        'browser/cocoa/authorization_util.h',
+        'browser/cocoa/authorization_util.mm',
+        'browser/cocoa/install_from_dmg.h',
+        'browser/cocoa/install_from_dmg.mm',
+        'browser/cocoa/keystone_glue.h',
+        'browser/cocoa/keystone_glue.mm',
+        'browser/cocoa/scoped_authorizationref.h',
+        'browser/cocoa/task_helpers.h',
+        'browser/cocoa/task_helpers.mm',
         'browser/command_updater.cc',
         'browser/command_updater.h',
         'browser/content_exceptions_table_model.cc',
@@ -2445,8 +2454,6 @@
         'browser/ui/cocoa/applescript/tab_applescript.mm',
         'browser/ui/cocoa/applescript/window_applescript.h',
         'browser/ui/cocoa/applescript/window_applescript.mm',
-        'browser/ui/cocoa/authorization_util.h',
-        'browser/ui/cocoa/authorization_util.mm',
         'browser/ui/cocoa/background_gradient_view.h',
         'browser/ui/cocoa/background_gradient_view.mm',
         'browser/ui/cocoa/background_tile_view.h',
@@ -2667,14 +2674,10 @@
         'browser/ui/cocoa/infobars/infobar_gradient_view.mm',
         'browser/ui/cocoa/infobars/infobar_test_helper.h',
         'browser/ui/cocoa/infobars/infobar_test_helper.mm',
-        'browser/ui/cocoa/install_from_dmg.h',
-        'browser/ui/cocoa/install_from_dmg.mm',
         'browser/ui/cocoa/instant_confirm_window_controller.h',
         'browser/ui/cocoa/instant_confirm_window_controller.mm',
         'browser/ui/cocoa/js_modal_dialog_cocoa.h',
         'browser/ui/cocoa/js_modal_dialog_cocoa.mm',
-        'browser/ui/cocoa/keystone_glue.h',
-        'browser/ui/cocoa/keystone_glue.mm',
         'browser/ui/cocoa/keystone_infobar.h',
         'browser/ui/cocoa/keystone_infobar.mm',
         'browser/ui/cocoa/l10n_util.h',
@@ -2761,7 +2764,6 @@
         'browser/ui/cocoa/restart_browser.mm',
         'browser/ui/cocoa/rwhvm_editcommand_helper.h',
         'browser/ui/cocoa/rwhvm_editcommand_helper.mm',
-        'browser/ui/cocoa/scoped_authorizationref.h',
         'browser/ui/cocoa/search_engine_dialog_controller.h',
         'browser/ui/cocoa/search_engine_dialog_controller.mm',
         'browser/ui/cocoa/shell_dialogs_mac.mm',
@@ -2820,8 +2822,6 @@
         'browser/ui/cocoa/tabs/tab_window_controller.mm',
         'browser/ui/cocoa/tabs/throbber_view.h',
         'browser/ui/cocoa/tabs/throbber_view.mm',
-        'browser/ui/cocoa/task_helpers.h',
-        'browser/ui/cocoa/task_helpers.mm',
         'browser/ui/cocoa/task_manager_mac.h',
         'browser/ui/cocoa/task_manager_mac.mm',
         'browser/ui/cocoa/theme_install_bubble_view.h',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 48644c58..7d2f37c 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1170,6 +1170,7 @@
         'browser/debugger/devtools_remote_listen_socket_unittest.h',
         'browser/debugger/devtools_remote_message_unittest.cc',
         'browser/diagnostics/diagnostics_model_unittest.cc',
+        'browser/cocoa/keystone_glue_unittest.mm',
         'browser/command_updater_unittest.cc',
         'browser/content_exceptions_table_model_unittest.cc',
         'browser/content_settings/content_settings_pattern_unittest.cc',
@@ -1579,7 +1580,6 @@
         'browser/ui/cocoa/infobars/infobar_controller_unittest.mm',
         'browser/ui/cocoa/infobars/infobar_gradient_view_unittest.mm',
         'browser/ui/cocoa/instant_confirm_window_controller_unittest.mm',
-        'browser/ui/cocoa/keystone_glue_unittest.mm',
         'browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm',
         'browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm',
         'browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm',