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

Side by Side Diff: chrome/browser/sync/sync_setup_wizard.cc

Issue 288005: First fix to minimize copying of image data. (Closed)
Patch Set: Modify gyp Created 11 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifdef CHROME_PERSONALIZATION 5 #ifdef CHROME_PERSONALIZATION
6 6
7 #include "chrome/browser/sync/sync_setup_wizard.h" 7 #include "chrome/browser/sync/sync_setup_wizard.h"
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 24 matching lines...) Expand all
35 return "text/html"; 35 return "text/html";
36 } 36 }
37 private: 37 private:
38 DISALLOW_COPY_AND_ASSIGN(SyncResourcesSource); 38 DISALLOW_COPY_AND_ASSIGN(SyncResourcesSource);
39 }; 39 };
40 40
41 void SyncResourcesSource::StartDataRequest(const std::string& path_raw, 41 void SyncResourcesSource::StartDataRequest(const std::string& path_raw,
42 int request_id) { 42 int request_id) {
43 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); 43 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
44 if (path_raw == chrome::kSyncThrobberPath) { 44 if (path_raw == chrome::kSyncThrobberPath) {
45 ResourceBundle::GetSharedInstance().LoadImageResourceBytes(IDR_THROBBER, 45 scoped_refptr<RefCountedMemory> throbber(
46 &html_bytes->data); 46 ResourceBundle::GetSharedInstance().LoadImageResourceBytes(
47 SendResponse(request_id, html_bytes); 47 IDR_THROBBER));
48 SendResponse(request_id, throbber);
48 return; 49 return;
49 } 50 }
50 51
51 std::string response; 52 std::string response;
52 if (path_raw == chrome::kSyncGaiaLoginPath) { 53 if (path_raw == chrome::kSyncGaiaLoginPath) {
53 DictionaryValue localized_strings; 54 DictionaryValue localized_strings;
54 localized_strings.SetString(L"settingupsync", 55 localized_strings.SetString(L"settingupsync",
55 l10n_util::GetString(IDS_SYNC_LOGIN_SETTING_UP_SYNC)); 56 l10n_util::GetString(IDS_SYNC_LOGIN_SETTING_UP_SYNC));
56 localized_strings.SetString(L"introduction", 57 localized_strings.SetString(L"introduction",
57 l10n_util::GetString(IDS_SYNC_LOGIN_INTRODUCTION)); 58 l10n_util::GetString(IDS_SYNC_LOGIN_INTRODUCTION));
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // static 191 // static
191 SyncSetupWizard::State SyncSetupWizard::GetEndStateForDiscreteRun( 192 SyncSetupWizard::State SyncSetupWizard::GetEndStateForDiscreteRun(
192 State start_state) { 193 State start_state) {
193 State result = start_state == GAIA_LOGIN ? GAIA_SUCCESS : DONE; 194 State result = start_state == GAIA_LOGIN ? GAIA_SUCCESS : DONE;
194 DCHECK_NE(DONE, result) << 195 DCHECK_NE(DONE, result) <<
195 "Invalid start state for discrete run: " << start_state; 196 "Invalid start state for discrete run: " << start_state;
196 return result; 197 return result;
197 } 198 }
198 199
199 #endif // CHROME_PERSONALIZATION 200 #endif // CHROME_PERSONALIZATION
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698