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

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

Issue 10917120: Activate the VariationsService for ChromeOS and ensure that it does not ping the server until the E… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: asvit nit 2 Created 8 years, 3 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
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 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 #if defined(OS_MACOSX) 1378 #if defined(OS_MACOSX)
1379 // Call Recycle() here as late as possible, before going into the loop 1379 // Call Recycle() here as late as possible, before going into the loop
1380 // because Start() will add things to it while creating the main window. 1380 // because Start() will add things to it while creating the main window.
1381 if (parameters().autorelease_pool) 1381 if (parameters().autorelease_pool)
1382 parameters().autorelease_pool->Recycle(); 1382 parameters().autorelease_pool->Recycle();
1383 #endif 1383 #endif
1384 1384
1385 RecordPreReadExperimentTime("Startup.BrowserOpenTabs", 1385 RecordPreReadExperimentTime("Startup.BrowserOpenTabs",
1386 base::TimeTicks::Now() - browser_open_start); 1386 base::TimeTicks::Now() - browser_open_start);
1387 1387
1388 // TODO(mad): Move this call in a proper place on CrOS.
1389 // http://crosbug.com/17687
1390 #if !defined(OS_CHROMEOS)
1391 // If we're running tests (ui_task is non-null), then we don't want to 1388 // If we're running tests (ui_task is non-null), then we don't want to
1392 // call FetchLanguageListFromTranslateServer or 1389 // call FetchLanguageListFromTranslateServer or
1393 // StartRepeatedVariationsSeedFetch. 1390 // StartRepeatedVariationsSeedFetch.
1394 if (parameters().ui_task == NULL) { 1391 if (parameters().ui_task == NULL) {
1395 // Request new variations seed information from server. 1392 // Request new variations seed information from server.
1396 browser_process_->variations_service()-> 1393 browser_process_->variations_service()->
1397 StartRepeatedVariationsSeedFetch(); 1394 StartRepeatedVariationsSeedFetch();
1398 1395 #if !defined(OS_CHROMEOS)
1396 // TODO(mad): Move this call in a proper place on CrOS.
1397 // http://crosbug.com/17687
1399 if (translate_manager_ != NULL) { 1398 if (translate_manager_ != NULL) {
1400 translate_manager_->FetchLanguageListFromTranslateServer( 1399 translate_manager_->FetchLanguageListFromTranslateServer(
1401 profile_->GetPrefs()); 1400 profile_->GetPrefs());
1402 } 1401 }
1402 #endif
1403 } 1403 }
1404 #endif
1405 1404
1406 run_message_loop_ = true; 1405 run_message_loop_ = true;
1407 } else { 1406 } else {
1408 run_message_loop_ = false; 1407 run_message_loop_ = false;
1409 } 1408 }
1410 browser_creator_.reset(); 1409 browser_creator_.reset();
1411 #endif // !defined(OS_ANDROID) 1410 #endif // !defined(OS_ANDROID)
1412 1411
1413 PostBrowserStart(); 1412 PostBrowserStart();
1414 1413
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 if (base::win::GetVersion() <= base::win::VERSION_XP) 1585 if (base::win::GetVersion() <= base::win::VERSION_XP)
1587 uma_name += "_XP"; 1586 uma_name += "_XP";
1588 1587
1589 uma_name += "_PreRead_"; 1588 uma_name += "_PreRead_";
1590 uma_name += pre_read_percentage; 1589 uma_name += pre_read_percentage;
1591 AddPreReadHistogramTime(uma_name.c_str(), time); 1590 AddPreReadHistogramTime(uma_name.c_str(), time);
1592 } 1591 }
1593 #endif 1592 #endif
1594 #endif 1593 #endif
1595 } 1594 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698