summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authordenisromanov@chromium.org <denisromanov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 16:07:45 +0000
committerdenisromanov@chromium.org <denisromanov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 16:07:45 +0000
commit368ad4cad5cc624d86036ca4276c5da8486cbe6c (patch)
tree1f1945200082c5d20adbe9220bc8749afe432b0f /chrome/browser/browser_init.cc
parent031857d5c3e4019dca3ae999792d1fe6b0798bd1 (diff)
downloadchromium_src-368ad4cad5cc624d86036ca4276c5da8486cbe6c.zip
chromium_src-368ad4cad5cc624d86036ca4276c5da8486cbe6c.tar.gz
chromium_src-368ad4cad5cc624d86036ca4276c5da8486cbe6c.tar.bz2
Added --services-manifest switch, to provide Chrome OS OEM services customization manifest on the command line.
The manifest is parsed and specified OEM welcome page is opened on startup. BUG=cros:3176 TEST=Run out/Debug/chrome --services-manifest=chrome/browser/chromeos/testdata/services_manifest.json. An URL specified in the manifest as the initial_start_page should be opened (presently http://localhost). Review URL: http://codereview.chromium.org/2691003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49798 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 8c6c8c6..fe3638d 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/browser_init.h"
+#include <algorithm> // For max().
+
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/event_recorder.h"
@@ -69,7 +71,7 @@
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/mount_library.h"
#include "chrome/browser/chromeos/cros/network_library.h"
-#include "chrome/browser/chromeos/cros/mount_library.h"
+#include "chrome/browser/chromeos/customization_document.h"
#include "chrome/browser/chromeos/gview_request_interceptor.h"
#include "chrome/browser/chromeos/low_battery_observer.h"
#include "chrome/browser/chromeos/network_message_observer.h"
@@ -446,6 +448,19 @@ bool BrowserInit::LaunchBrowser(
return true;
}
+#if defined(OS_CHROMEOS)
+bool BrowserInit::ApplyServicesCustomization(
+ const chromeos::ServicesCustomizationDocument* customization) {
+ GURL welcome_url(customization->initial_start_page_url());
+ DCHECK(welcome_url.is_valid()) << welcome_url;
+ if (welcome_url.is_valid()) {
+ AddFirstRunTab(welcome_url);
+ }
+ // TODO(denisromanov): Add extensions and web apps customization here.
+ return true;
+}
+#endif
+
// LaunchWithProfile ----------------------------------------------------------
BrowserInit::LaunchWithProfile::LaunchWithProfile(